From 4aae7032db2f256d6ff53f01b4157fe20992968f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dorian=20P=C3=A9ron?= Date: Fri, 13 Nov 2026 11:28:46 +0100 Subject: [PATCH] stty: Fix 'clippy::used_underscore_binding' --- src/uu/stty/src/stty.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/uu/stty/src/stty.rs b/src/uu/stty/src/stty.rs index 02227a5a222..eb692679098 100644 --- a/src/uu/stty/src/stty.rs +++ b/src/uu/stty/src/stty.rs @@ -894,7 +894,7 @@ fn apply_saved_state(termios: &mut Termios, state: &(CFlags, CCFlags)) { } fn apply_special_setting( - _termios: &mut Termios, + termios: &mut Termios, setting: &SpecialSetting, fd: impl AsFd, ) -> io::Result<()> { @@ -902,15 +902,16 @@ fn apply_special_setting( match setting { SpecialSetting::Rows(n) => size.ws_row = *n, SpecialSetting::Cols(n) => size.ws_col = *n, - #[cfg_attr( - not(any(target_os = "linux", target_os = "android")), - expect(unused_variables) - )] SpecialSetting::Line(n) => { // nix only defines Termios's `line_discipline` field on these platforms #[cfg(any(target_os = "linux", target_os = "android"))] { - _termios.line_discipline = *n; + termios.line_discipline = *n; + } + #[cfg(not(any(target_os = "linux", target_os = "android")))] + { + let _ = termios; + let _ = n; } } }