rust/hg-core/src/errors.rs
changeset 46462 d03b0601e0eb
parent 46443 43d63979a75e
child 46483 2845892dd489
--- a/rust/hg-core/src/errors.rs	Mon Feb 01 19:30:28 2021 +0100
+++ b/rust/hg-core/src/errors.rs	Thu Jan 14 13:04:12 2021 +0100
@@ -40,6 +40,10 @@
         // https://doc.rust-lang.org/std/backtrace/struct.Backtrace.html
         HgError::CorruptedRepository(explanation.into())
     }
+
+    pub fn unsupported(explanation: impl Into<String>) -> Self {
+        HgError::UnsupportedFeature(explanation.into())
+    }
 }
 
 // TODO: use `DisplayBytes` instead to show non-Unicode filenames losslessly?