summaryrefslogtreecommitdiff
path: root/rust/src
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src')
-rw-r--r--rust/src/project.rs17
1 files changed, 16 insertions, 1 deletions
diff --git a/rust/src/project.rs b/rust/src/project.rs
index f2743e80..fc750bcb 100644
--- a/rust/src/project.rs
+++ b/rust/src/project.rs
@@ -3,7 +3,8 @@ pub mod folder;
use std::ffi::c_void;
use std::fmt::Debug;
-use std::path::Path;
+use std::hash::Hash;
+use std::path::{Path, PathBuf};
use std::ptr::{null_mut, NonNull};
use std::time::{Duration, SystemTime, UNIX_EPOCH};
@@ -636,6 +637,20 @@ impl Debug for Project {
}
}
+impl PartialEq for Project {
+ fn eq(&self, other: &Self) -> bool {
+ self.id() == other.id()
+ }
+}
+
+impl Eq for Project {}
+
+impl Hash for Project {
+ fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
+ self.id().hash(state);
+ }
+}
+
impl ToOwned for Project {
type Owned = Ref<Self>;