diff -r 68a15b5a7e58 -r 776b97179c06 rust/hg-core/src/lib.rs --- a/rust/hg-core/src/lib.rs Wed Jan 27 13:41:28 2021 +0100 +++ b/rust/hg-core/src/lib.rs Wed Jan 27 14:00:21 2021 +0100 @@ -51,33 +51,6 @@ /// write access to your repository, you have other issues. pub type FastHashMap = HashMap; -#[derive(Clone, Debug, PartialEq)] -pub enum DirstateParseError { - TooLittleData, - Overflow, - // TODO refactor to use bytes instead of String - CorruptedEntry(String), - Damaged, -} - -impl From for DirstateParseError { - fn from(e: std::io::Error) -> Self { - DirstateParseError::CorruptedEntry(e.to_string()) - } -} - -impl ToString for DirstateParseError { - fn to_string(&self) -> String { - use crate::DirstateParseError::*; - match self { - TooLittleData => "Too little data for dirstate.".to_string(), - Overflow => "Overflow in dirstate.".to_string(), - CorruptedEntry(e) => format!("Corrupted entry: {:?}.", e), - Damaged => "Dirstate appears to be damaged.".to_string(), - } - } -} - #[derive(Debug, PartialEq)] pub enum DirstateMapError { PathNotFound(HgPathBuf), @@ -99,9 +72,7 @@ #[derive(Debug, derive_more::From)] pub enum DirstateError { - Parse(DirstateParseError), Map(DirstateMapError), - IO(std::io::Error), Common(errors::HgError), }