Skip to content

Commit

Permalink
feat(clipboard): code style change: perform match inside function call
Browse files Browse the repository at this point in the history
  • Loading branch information
CheerfulPianissimo committed Mar 26, 2024
1 parent 7dcfaab commit ff8f394
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions wayshot/src/wayshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,14 @@ fn main() -> Result<()> {
}

if cli.clipboard {
let buffer = match image_buf {
clipboard_daemonize(match image_buf {
Some(buf) => buf,
None => {
let mut buffer = Cursor::new(Vec::new());
image_buffer.write_to(&mut buffer, requested_encoding)?;
buffer
}
};
clipboard_daemonize(buffer)?;
})?;
}

Ok(())
Expand Down

0 comments on commit ff8f394

Please sign in to comment.