We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
PartialEq
Eq
Hash
ProjectFile
1 parent 938e950 commit 34e9363Copy full SHA for 34e9363
1 file changed
rust/src/project/file.rs
@@ -11,6 +11,7 @@ use binaryninjacore_sys::{
11
BNProjectFileSetFolder, BNProjectFileSetName,
12
};
13
use std::fmt::Debug;
14
+use std::hash::Hash;
15
use std::path::{Path, PathBuf};
16
use std::ptr::{null_mut, NonNull};
17
use std::time::SystemTime;
@@ -155,6 +156,20 @@ impl Debug for ProjectFile {
155
156
unsafe impl Send for ProjectFile {}
157
unsafe impl Sync for ProjectFile {}
158
159
+impl PartialEq for ProjectFile {
160
+ fn eq(&self, other: &Self) -> bool {
161
+ self.id() == other.id()
162
+ }
163
+}
164
+
165
+impl Eq for ProjectFile {}
166
167
+impl Hash for ProjectFile {
168
+ fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
169
+ self.id().hash(state);
170
171
172
173
impl ToOwned for ProjectFile {
174
type Owned = Ref<Self>;
175
0 commit comments