partialeq_to_none

This commit is contained in:
Johann Hemmann 2024-01-19 16:11:50 +01:00
parent 7e8568b293
commit 692212bbdd
2 changed files with 1 additions and 2 deletions

View file

@ -179,7 +179,6 @@ needless_doctest_main = "allow"
new_without_default = "allow" new_without_default = "allow"
non_canonical_clone_impl = "allow" non_canonical_clone_impl = "allow"
non_canonical_partial_ord_impl = "allow" non_canonical_partial_ord_impl = "allow"
partialeq_to_none = "allow"
ptr_arg = "allow" ptr_arg = "allow"
redundant_closure = "allow" redundant_closure = "allow"
redundant_pattern_matching = "allow" redundant_pattern_matching = "allow"

View file

@ -1253,7 +1253,7 @@ impl<'db> SemanticsImpl<'db> {
assert!(root_node.parent().is_none()); assert!(root_node.parent().is_none());
let mut cache = self.cache.borrow_mut(); let mut cache = self.cache.borrow_mut();
let prev = cache.insert(root_node, file_id); let prev = cache.insert(root_node, file_id);
assert!(prev == None || prev == Some(file_id)) assert!(prev.is_none() || prev == Some(file_id))
} }
pub fn assert_contains_node(&self, node: &SyntaxNode) { pub fn assert_contains_node(&self, node: &SyntaxNode) {