diff options
author | rabite <rabite@posteo.de> | 2019-03-09 13:42:16 +0100 |
---|---|---|
committer | rabite <rabite@posteo.de> | 2019-03-09 13:42:16 +0100 |
commit | 67e1616efbaaf85d4990a3c89760324d48be7084 (patch) | |
tree | 97e93e2cac06be8675dd110cee633fe7ebdcb4c6 /src/fail.rs | |
parent | 8cd72e3004ca967457575c87d36004982acec9d3 (diff) |
filename/selection substitution for tabs ($0s, $1s, etc)
Diffstat (limited to 'src/fail.rs')
-rw-r--r-- | src/fail.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fail.rs b/src/fail.rs index 2c01885..1aa1d42 100644 --- a/src/fail.rs +++ b/src/fail.rs @@ -50,6 +50,8 @@ pub enum HError { HBoxWrongRatioError{ wnum: usize, ratio: Vec<usize> }, #[fail(display = "Got wrong widget: {}! Wanted: {}", got, wanted)] WrongWidgetError{got: String, wanted: String}, + #[fail(display = "Strip Prefix Error: {}", error)] + StripPrefixError{#[cause] error: std::path::StripPrefixError}, } impl HError { @@ -145,3 +147,10 @@ impl From<std::option::NoneError> for HError { HError::NoneError } } + +impl From<std::path::StripPrefixError> for HError { + fn from(error: std::path::StripPrefixError) -> Self { + dbg!(&error); + HError::StripPrefixError{error: error} + } +} |