rust/hg-core/src/lib.rs
changeset 43788 1fe2e574616e
parent 43438 a77d4fe347a4
child 43826 5ac243a92e37
--- a/rust/hg-core/src/lib.rs	Sun Dec 01 18:46:10 2019 -0500
+++ b/rust/hg-core/src/lib.rs	Fri Nov 22 10:39:05 2019 +0100
@@ -101,6 +101,20 @@
 pub enum DirstateMapError {
     PathNotFound(HgPathBuf),
     EmptyPath,
+    ConsecutiveSlashes,
+}
+
+impl ToString for DirstateMapError {
+    fn to_string(&self) -> String {
+        use crate::DirstateMapError::*;
+        match self {
+            PathNotFound(_) => "expected a value, found none".to_string(),
+            EmptyPath => "Overflow in dirstate.".to_string(),
+            ConsecutiveSlashes => {
+                "found invalid consecutive slashes in path".to_string()
+            }
+        }
+    }
 }
 
 pub enum DirstateError {