try! -> ? in SendToWorkspace in D-Bus interface
@@ -137,10 +137,10 @@ dbus_interface! {
}
fn SendToWorkspace(container_id: String, w_name: String) -> success: DBusResult<bool> {
- let mut tree = try!(lock_tree_dbus());
- let uuid = try!(try!(parse_uuid("container_id", &container_id))
+ let mut tree = lock_tree_dbus()?;
+ let uuid = parse_uuid("container_id", &container_id)?
.or_else(|| tree.active_id())
- .ok_or(MethodErr::failed(&"No active container")));
+ .ok_or(MethodErr::failed(&"No active container"))?;
tree.send_to_workspace(uuid, w_name.as_str())
.and(Ok(true))
.map_err(|err| MethodErr::failed(&format!("{:?}", err)))
