diff options
| author | Glenn Smith <glenn@vector35.com> | 2022-08-29 22:43:59 -0400 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2022-09-29 21:02:22 -0400 |
| commit | 8cbdc0e05adefd58e6939f7bb70d6f031277e4f6 (patch) | |
| tree | 439ddd7a8eddaca0a54bb980f1ce8b46dc57399d /rust/src/symbol.rs | |
| parent | 9fd6ed156fb926c64420c1b38b4e27f0e5c17d0a (diff) | |
[Rust API]: Eq for Ref<Type>
Diffstat (limited to 'rust/src/symbol.rs')
| -rw-r--r-- | rust/src/symbol.rs | 7 |
1 files changed, 3 insertions, 4 deletions
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<S: BnStrCompatible> SymbolBuilder<S> { } } -#[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<Symbol> { +impl PartialEq for Symbol { fn eq(&self, other: &Self) -> bool { - **self == **other + *self == *other } } -impl Eq for Ref<Symbol> {} impl Hash for Ref<Symbol> { fn hash<H: Hasher>(&self, state: &mut H) { |
