From d5d514ec961a06e736a259f79d2e83c0b124c29d Mon Sep 17 00:00:00 2001 From: Alexander McLin Date: Fri, 10 Apr 2026 21:57:23 -0400 Subject: [PATCH] Issue 3264: reformat to conform to style guidelines --- src/read/fallback_mode.rs | 11 +++++------ src/read/user_interaction.rs | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/read/fallback_mode.rs b/src/read/fallback_mode.rs index b7a5ba92..759ac890 100644 --- a/src/read/fallback_mode.rs +++ b/src/read/fallback_mode.rs @@ -1,10 +1,10 @@ use crossterm::event::{KeyCode, KeyEvent, KeyEventKind, KeyEventState, KeyModifiers}; -use std::io::{Read, Error, ErrorKind}; +use std::io::{Error, ErrorKind, Read}; -// Provide graceful degradation limited support mode if reading from stdin that does not +// Provide graceful degradation limited support mode if reading from stdin that does not // support terminal features. // -// Retrieve a single byte from stdin, does not support full Unicode decoding; only convert +// Retrieve a single byte from stdin, does not support full Unicode decoding; only convert // byte to KeyEvent char if it falls within the ASCII subset of UTF-8. // // Does not support passing through Ctrl-C as a KeyEvent. @@ -16,8 +16,7 @@ pub(crate) fn limited_support_read() -> std::io::Result { Ok(b) => { if b.is_ascii() { Ok(map_ascii_to_keyevent(b as char)) - } - else { + } else { Err(Error::new(ErrorKind::Unsupported, "not supported input")) } } @@ -34,4 +33,4 @@ fn map_ascii_to_keyevent(c: char) -> KeyEvent { kind: KeyEventKind::Press, state: KeyEventState::empty(), } -} \ No newline at end of file +} diff --git a/src/read/user_interaction.rs b/src/read/user_interaction.rs index fb82259f..1f5e106d 100644 --- a/src/read/user_interaction.rs +++ b/src/read/user_interaction.rs @@ -46,4 +46,4 @@ fn supported_terminal() -> bool { // If OS is Windows and stdin is not a tty, it's either a pipe or an unsupported terminal configuration. !windows_os || std::io::stdin().is_tty() -} \ No newline at end of file +} -- 2.54.0