rust/hg-core/src/lib.rs
changeset 50535 a8531bd9210b
parent 49913 c15b415d1bff
child 50860 f50e71fdfcb4
equal deleted inserted replaced
50534:057639af827c 50535:a8531bd9210b
    61     hashbrown::HashMap<K, V, RandomXxHashBuilder64>;
    61     hashbrown::HashMap<K, V, RandomXxHashBuilder64>;
    62 
    62 
    63 #[derive(Debug, PartialEq)]
    63 #[derive(Debug, PartialEq)]
    64 pub enum DirstateMapError {
    64 pub enum DirstateMapError {
    65     PathNotFound(HgPathBuf),
    65     PathNotFound(HgPathBuf),
    66     EmptyPath,
       
    67     InvalidPath(HgPathError),
    66     InvalidPath(HgPathError),
    68 }
    67 }
    69 
    68 
    70 impl fmt::Display for DirstateMapError {
    69 impl fmt::Display for DirstateMapError {
    71     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
    70     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
    72         match self {
    71         match self {
    73             DirstateMapError::PathNotFound(_) => {
    72             DirstateMapError::PathNotFound(_) => {
    74                 f.write_str("expected a value, found none")
    73                 f.write_str("expected a value, found none")
    75             }
       
    76             DirstateMapError::EmptyPath => {
       
    77                 f.write_str("Overflow in dirstate.")
       
    78             }
    74             }
    79             DirstateMapError::InvalidPath(path_error) => path_error.fmt(f),
    75             DirstateMapError::InvalidPath(path_error) => path_error.fmt(f),
    80         }
    76         }
    81     }
    77     }
    82 }
    78 }