diff options
Diffstat (limited to 'copypasta/src/macos.rs')
-rw-r--r-- | copypasta/src/macos.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/copypasta/src/macos.rs b/copypasta/src/macos.rs index 4910790d..dfbf5a87 100644 --- a/copypasta/src/macos.rs +++ b/copypasta/src/macos.rs @@ -222,11 +222,12 @@ impl super::Load for Clipboard { type Err = Error; fn new() -> Result<Self, Error> { - Ok(Clipboard(try!(ns::Pasteboard::new()))) + Ok(Clipboard(ns::Pasteboard::new()?)) } fn load_primary(&self) -> Result<String, Self::Err> { - Ok(try!(self::ns::PasteboardReadObject::<String>::read_object(&self.0))) + self::ns::PasteboardReadObject::<String>::read_object(&self.0) + .map_err(::std::convert::From::from) } } |