aboutsummaryrefslogtreecommitdiff
path: root/copypasta/src/macos.rs
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2016-12-16 22:29:35 -0800
committerJoe Wilm <joe@jwilm.com>2016-12-16 22:29:35 -0800
commit0421012c2d82ce2703bb122fd395d669a28f7d49 (patch)
tree3d7ce6d1a4872e48dc713f210942bad891fa75af /copypasta/src/macos.rs
parentdc918ae71a5e6c78a77994d7ce106a2253918c54 (diff)
downloadalacritty-0421012c2d82ce2703bb122fd395d669a28f7d49.tar.gz
alacritty-0421012c2d82ce2703bb122fd395d669a28f7d49.zip
Replace remaining use of `try!` with `?`
Diffstat (limited to 'copypasta/src/macos.rs')
-rw-r--r--copypasta/src/macos.rs5
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)
}
}