diff rust/hg-core/src/lib.rs @ 46439:68a15b5a7e58

rust: Replace DirstatePackError with HgError Differential Revision: https://phab.mercurial-scm.org/D9893
author Simon Sapin <simon.sapin@octobus.net>
date Wed, 27 Jan 2021 13:41:28 +0100
parents 39e9407820ac
children 776b97179c06
line wrap: on
line diff
--- a/rust/hg-core/src/lib.rs	Wed Jan 27 13:19:49 2021 +0100
+++ b/rust/hg-core/src/lib.rs	Wed Jan 27 13:41:28 2021 +0100
@@ -79,19 +79,6 @@
 }
 
 #[derive(Debug, PartialEq)]
-pub enum DirstatePackError {
-    CorruptedEntry(String),
-    CorruptedParent,
-    BadSize(usize, usize),
-}
-
-impl From<std::io::Error> for DirstatePackError {
-    fn from(e: std::io::Error) -> Self {
-        DirstatePackError::CorruptedEntry(e.to_string())
-    }
-}
-
-#[derive(Debug, PartialEq)]
 pub enum DirstateMapError {
     PathNotFound(HgPathBuf),
     EmptyPath,
@@ -113,9 +100,9 @@
 #[derive(Debug, derive_more::From)]
 pub enum DirstateError {
     Parse(DirstateParseError),
-    Pack(DirstatePackError),
     Map(DirstateMapError),
     IO(std::io::Error),
+    Common(errors::HgError),
 }
 
 #[derive(Debug, derive_more::From)]