rust/hg-core/src/dirstate_tree/path_with_basename.rs
changeset 47119 15395fd8ab28
parent 47096 3c11c24b82b6
child 47126 ecfe0819ada5
equal deleted inserted replaced
47118:c92e63762573 47119:15395fd8ab28
    50 }
    50 }
    51 
    51 
    52 impl<T: AsRef<HgPath>> Borrow<HgPath> for WithBasename<T> {
    52 impl<T: AsRef<HgPath>> Borrow<HgPath> for WithBasename<T> {
    53     fn borrow(&self) -> &HgPath {
    53     fn borrow(&self) -> &HgPath {
    54         self.base_name()
    54         self.base_name()
       
    55     }
       
    56 }
       
    57 
       
    58 impl<T: AsRef<HgPath>> std::hash::Hash for WithBasename<T> {
       
    59     fn hash<H: std::hash::Hasher>(&self, hasher: &mut H) {
       
    60         self.base_name().hash(hasher)
    55     }
    61     }
    56 }
    62 }
    57 
    63 
    58 impl<T: AsRef<HgPath> + PartialEq> PartialEq for WithBasename<T> {
    64 impl<T: AsRef<HgPath> + PartialEq> PartialEq for WithBasename<T> {
    59     fn eq(&self, other: &Self) -> bool {
    65     fn eq(&self, other: &Self) -> bool {