aboutsummaryrefslogtreecommitdiff
path: root/azalea-inventory/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-inventory/src')
-rw-r--r--azalea-inventory/src/components.rs6
-rw-r--r--azalea-inventory/src/operations.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/azalea-inventory/src/components.rs b/azalea-inventory/src/components.rs
index f63ca1ad..ad15a461 100644
--- a/azalea-inventory/src/components.rs
+++ b/azalea-inventory/src/components.rs
@@ -41,7 +41,7 @@ pub trait EncodableDataComponent: Send + Sync + Any {
// function instead
fn clone(&self) -> Box<dyn EncodableDataComponent>;
// same thing here
- fn eq(&self, other: Box<dyn EncodableDataComponent>) -> bool;
+ fn eq(&self, other: &dyn EncodableDataComponent) -> bool;
}
impl<T> EncodableDataComponent for T
@@ -58,8 +58,8 @@ where
let cloned = self.clone();
Box::new(cloned)
}
- fn eq(&self, other: Box<dyn EncodableDataComponent>) -> bool {
- let other_any: Box<dyn Any> = other;
+ fn eq(&self, other: &dyn EncodableDataComponent) -> bool {
+ let other_any: &dyn Any = other;
match other_any.downcast_ref::<T>() {
Some(other) => self == other,
_ => false,
diff --git a/azalea-inventory/src/operations.rs b/azalea-inventory/src/operations.rs
index 60bf9e64..97ae1e60 100644
--- a/azalea-inventory/src/operations.rs
+++ b/azalea-inventory/src/operations.rs
@@ -253,7 +253,7 @@ impl ClickOperation {
}
}
-#[derive(AzBuf, Clone, Copy, Debug)]
+#[derive(AzBuf, Clone, Copy, Debug, PartialEq)]
pub enum ClickType {
Pickup = 0,
QuickMove = 1,