From b79aecad29ed78d6dfc511bf33e6238e987dfdbc Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Fri, 5 Jan 2024 22:59:08 +0000 Subject: [PATCH] Clippy fix: use write_all to beep. Clippy complains that I used stdout().write(), and although I checked the error code, I didn't also check whether it had written the full buffer or only part of it. But it didn't notice that the buffer was one byte long! --- src/tui.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tui.rs b/src/tui.rs index 9b6bab9..52c90a2 100644 --- a/src/tui.rs +++ b/src/tui.rs @@ -402,7 +402,7 @@ impl Tui { } fn beep() -> std::io::Result<()> { - stdout().write(b"\x07")?; + stdout().write_all(b"\x07")?; Ok(()) } } -- 2.30.2