diff --git a/src/lib.rs b/src/lib.rs index ddd509f..936fe9f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -58,7 +58,8 @@ impl Clipboard { if let Ok(reply) = self.request_receiver.recv() { match reply { - Ok((data, mime)) => T::try_from((data, mime)).map_err(std::io::Error::other), + Ok((data, mime)) => T::try_from((data, mime)) + .map_err(|err| std::io::Error::new(std::io::ErrorKind::Other, err)), Err(err) => Err(err), } } else { diff --git a/src/mime.rs b/src/mime.rs index 5bda1a0..cd538dc 100644 --- a/src/mime.rs +++ b/src/mime.rs @@ -19,16 +19,16 @@ pub enum MimeType { /// text/plain;charset=utf-8 mime type. /// /// The primary mime type used by most clients - TextPlainUtf8 = 0, + TextPlainUtf8, /// UTF8_STRING mime type. /// /// Some X11 clients are using only this mime type, so we /// should have it as a fallback just in case. - Utf8String = 1, + Utf8String, /// text/plain mime type. /// /// Fallback without charset parameter. - TextPlain = 2, + TextPlain, /// Other mime type Other(Cow<'static, str>), }