Skip to content

Commit 57cf70f

Browse files
committed
Fix clippy warnings
1 parent 04d4311 commit 57cf70f

2 files changed

Lines changed: 5 additions & 10 deletions

File tree

‎src/command.rs‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,10 @@ impl<'name> Command<'name> {
133133

134134
let output = Output {
135135
status: output.status,
136-
stdout: String::from_utf8(output.stdout).map_err(|_| {
137-
io::Error::new(io::ErrorKind::Other, "Cannot decode stdout as utf-8")
138-
})?,
139-
stderr: String::from_utf8(output.stderr).map_err(|_| {
140-
io::Error::new(io::ErrorKind::Other, "Cannot decode stderr as utf-8")
141-
})?,
136+
stdout: String::from_utf8(output.stdout)
137+
.map_err(|_| io::Error::other("Cannot decode stdout as utf-8"))?,
138+
stderr: String::from_utf8(output.stderr)
139+
.map_err(|_| io::Error::other("Cannot decode stderr as utf-8"))?,
142140
};
143141
log::trace!("output: {:?}", &output);
144142

‎src/config.rs‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,7 @@ impl Config {
7373
}
7474

7575
fn ask_after_timer() -> Option<String> {
76-
let cmd = match after_timer_command() {
77-
Some(cmd) => cmd,
78-
None => return None,
79-
};
76+
let cmd = after_timer_command()?;
8077

8178
log::info!("Command to run when your turn is done:");
8279
log::info!(" {}", &cmd);

0 commit comments

Comments
 (0)