diff options
Diffstat (limited to '')
| -rw-r--r-- | src/error.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs index 9e1ee9d..c8405f4 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,3 +1,4 @@ +use std::borrow::Cow; use std::io; use std::sync::Arc; @@ -57,3 +58,9 @@ impl From<Error> for String { value.to_string() } } + +impl From<Error> for Cow<'static, str> { + fn from(value: Error) -> Self { + value.to_string().into() + } +} |
