aboutsummaryrefslogtreecommitdiff
path: root/azalea-inventory/src/components.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-02-22 23:01:54 +0000
committermat <git@matdoes.dev>2025-02-22 23:01:54 +0000
commit34f53baf85fb5c7163ec5d71a8ab9d45d3f271b6 (patch)
tree7920fec1203e8e96463a142f5f6da6164e76e684 /azalea-inventory/src/components.rs
parentbdd2fc91e11e2896d8e1c7046df247e1075bd40d (diff)
downloadazalea-drasl-34f53baf85fb5c7163ec5d71a8ab9d45d3f271b6.tar.xz
update to rust edition 2024
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,
}
}
}