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/rc.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'rust/src/rc.rs') diff --git a/rust/src/rc.rs b/rust/src/rc.rs index a65403e2..ad9d9e35 100644 --- a/rust/src/rc.rs +++ b/rust/src/rc.rs @@ -112,6 +112,14 @@ impl Debug for Ref { } } +impl PartialEq for Ref { + fn eq(&self, other: &Self) -> bool { + self.contents.eq(&other.contents) + } +} + +impl Eq for Ref {} + // Guard provides access to a core-allocated resource whose // reference is held indirectly (e.g. a core-allocated array // of raw `*mut BNRawT`). -- cgit v1.3.1