Skip to content

Commit d7e1f9a

Browse files
committed
refactor: Apply fix for clippy::unnecessary_map_or
1 parent 4709056 commit d7e1f9a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fluent-bundle/src/types/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ pub trait AnyEq: Any + 'static {
6060

6161
impl<T: Any + PartialEq> AnyEq for T {
6262
fn equals(&self, other: &dyn Any) -> bool {
63-
other
64-
.downcast_ref::<Self>()
65-
.map_or(false, |that| self == that)
63+
other.downcast_ref::<Self>() == Some(self)
6664
}
6765
fn as_any(&self) -> &dyn Any {
6866
self

0 commit comments

Comments
 (0)