diff rust/hg-core/src/errors.rs @ 46524:d03b0601e0eb

rhg: initial support for shared repositories Differential Revision: https://phab.mercurial-scm.org/D9941
author Simon Sapin <simon.sapin@octobus.net>
date Thu, 14 Jan 2021 13:04:12 +0100
parents 43d63979a75e
children 2845892dd489
line wrap: on
line diff
--- 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?