Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/utils.rs')
-rw-r--r--crates/hir-ty/src/utils.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir-ty/src/utils.rs b/crates/hir-ty/src/utils.rs
index 9ec3dead17..bf7892f69b 100644
--- a/crates/hir-ty/src/utils.rs
+++ b/crates/hir-ty/src/utils.rs
@@ -373,7 +373,7 @@ impl OpaqueInternableThing for InTypeConstIdMetadata {
}
fn dyn_eq(&self, other: &dyn OpaqueInternableThing) -> bool {
- other.as_any().downcast_ref::<Self>().map_or(false, |x| self == x)
+ other.as_any().downcast_ref::<Self>() == Some(self)
}
fn dyn_clone(&self) -> Box<dyn OpaqueInternableThing> {