From 8cbdc0e05adefd58e6939f7bb70d6f031277e4f6 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Mon, 29 Aug 2022 22:43:59 -0400 Subject: [Rust API]: Eq for Ref --- rust/src/symbol.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'rust/src/symbol.rs') diff --git a/rust/src/symbol.rs b/rust/src/symbol.rs index 21ae440e..2d5df068 100644 --- a/rust/src/symbol.rs +++ b/rust/src/symbol.rs @@ -163,7 +163,7 @@ impl SymbolBuilder { } } -#[derive(PartialEq, Eq, Hash)] +#[derive(Hash)] pub struct Symbol { pub(crate) handle: *mut BNSymbol, } @@ -278,12 +278,11 @@ unsafe impl<'a> CoreArrayWrapper<'a> for Symbol { } } -impl PartialEq for Ref { +impl PartialEq for Symbol { fn eq(&self, other: &Self) -> bool { - **self == **other + *self == *other } } -impl Eq for Ref {} impl Hash for Ref { fn hash(&self, state: &mut H) { -- cgit v1.3.1