mirror of
https://github.com/NotAShelf/stash.git
synced 2026-06-20 11:43:55 +00:00
various: fix collapsable-if clippy warnings
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I379d9b83a86707a59d8fdf8199a22c426a6a6964
This commit is contained in:
parent
8c339240c7
commit
6413449c45
2 changed files with 9 additions and 13 deletions
|
|
@ -474,13 +474,11 @@ fn handle_regular_paste(
|
|||
|| types == "application/x-sh"
|
||||
};
|
||||
|
||||
if !args.no_newline && is_text_content && !buf.ends_with(b"\n") {
|
||||
if let Err(e) = out.write_all(b"\n") {
|
||||
if e.kind() != io::ErrorKind::BrokenPipe {
|
||||
if !args.no_newline && is_text_content && !buf.ends_with(b"\n")
|
||||
&& let Err(e) = out.write_all(b"\n")
|
||||
&& e.kind() != io::ErrorKind::BrokenPipe {
|
||||
bail!("failed to write newline to stdout: {e}");
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
Err(PasteError::NoSeats) => {
|
||||
bail!("no seats available (is a Wayland compositor running?)");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue