diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2018-08-11 22:47:27 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-06-10 19:40:28 +0300 |
commit | d8137738b550c78d87592c784c5bcedb54de61aa (patch) | |
tree | 2e41394ab54e915a271ae80bd57aee9910dd031c /melib/src/error.rs | |
parent | 1b44aae5ce97a123657f64769ed32f31aed96b94 (diff) |
Add more charsets and parsing stuff
Diffstat (limited to 'melib/src/error.rs')
-rw-r--r-- | melib/src/error.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/melib/src/error.rs b/melib/src/error.rs index 1bdd9021..432325ce 100644 --- a/melib/src/error.rs +++ b/melib/src/error.rs @@ -28,6 +28,7 @@ use std::error::Error; use std::fmt; use std::io; use std::result; +use std::string; use nom; @@ -82,6 +83,13 @@ impl<'a> From<Cow<'a, str>> for MeliError { } } +impl From<string::FromUtf8Error> for MeliError { + #[inline] + fn from(kind: string::FromUtf8Error) -> MeliError { + MeliError::new(format!("{:?}", kind)) + } +} + //use std::option; //impl From<option::NoneError> for MeliError { // #[inline] |