diff --git a/rust/hg-core/src/lib.rs b/rust/hg-core/src/lib.rs --- a/rust/hg-core/src/lib.rs +++ b/rust/hg-core/src/lib.rs @@ -63,7 +63,6 @@ pub type FastHashbrownMap = #[derive(Debug, PartialEq)] pub enum DirstateMapError { PathNotFound(HgPathBuf), - EmptyPath, InvalidPath(HgPathError), } @@ -73,9 +72,6 @@ impl fmt::Display for DirstateMapError { DirstateMapError::PathNotFound(_) => { f.write_str("expected a value, found none") } - DirstateMapError::EmptyPath => { - f.write_str("Overflow in dirstate.") - } DirstateMapError::InvalidPath(path_error) => path_error.fmt(f), } } diff --git a/rust/hg-cpython/src/dirstate/dirs_multiset.rs b/rust/hg-cpython/src/dirstate/dirs_multiset.rs --- a/rust/hg-cpython/src/dirstate/dirs_multiset.rs +++ b/rust/hg-cpython/src/dirstate/dirs_multiset.rs @@ -17,7 +17,7 @@ use cpython::{ use hg::{ utils::hg_path::{HgPath, HgPathBuf}, - DirsMultiset, DirsMultisetIter, DirstateMapError, + DirsMultiset, DirsMultisetIter, }; py_class!(pub class Dirs |py| { @@ -56,9 +56,6 @@ py_class!(pub class Dirs |py| { HgPath::new(path.extract::(py)?.data(py)), ).and(Ok(py.None())).or_else(|e| { match e { - DirstateMapError::EmptyPath => { - Ok(py.None()) - }, e => { Err(PyErr::new::( py, @@ -76,9 +73,6 @@ py_class!(pub class Dirs |py| { .and(Ok(py.None())) .or_else(|e| { match e { - DirstateMapError::EmptyPath => { - Ok(py.None()) - }, e => { Err(PyErr::new::( py,