rust/hg-core/src/dirstate_tree/path_with_basename.rs
changeset 47119 15395fd8ab28
parent 47096 3c11c24b82b6
child 47126 ecfe0819ada5
--- a/rust/hg-core/src/dirstate_tree/path_with_basename.rs	Tue Apr 27 17:49:38 2021 +0200
+++ b/rust/hg-core/src/dirstate_tree/path_with_basename.rs	Thu Apr 29 11:32:57 2021 +0200
@@ -55,6 +55,12 @@
     }
 }
 
+impl<T: AsRef<HgPath>> std::hash::Hash for WithBasename<T> {
+    fn hash<H: std::hash::Hasher>(&self, hasher: &mut H) {
+        self.base_name().hash(hasher)
+    }
+}
+
 impl<T: AsRef<HgPath> + PartialEq> PartialEq for WithBasename<T> {
     fn eq(&self, other: &Self) -> bool {
         self.base_name() == other.base_name()