aboutsummaryrefslogtreecommitdiff
path: root/azalea-inventory/src/components.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-inventory/src/components.rs')
-rw-r--r--azalea-inventory/src/components.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/azalea-inventory/src/components.rs b/azalea-inventory/src/components.rs
index 6dd60819..b299664f 100644
--- a/azalea-inventory/src/components.rs
+++ b/azalea-inventory/src/components.rs
@@ -42,10 +42,9 @@ where
}
fn eq(&self, other: Box<dyn EncodableDataComponent>) -> bool {
let other_any: Box<dyn Any> = other;
- if let Some(other) = other_any.downcast_ref::<T>() {
- self == other
- } else {
- false
+ match other_any.downcast_ref::<T>() {
+ Some(other) => self == other,
+ _ => false,
}
}
}