Turn unnecessary closure into regular function

This commit is contained in:
Remo Senekowitsch 2026-04-20 13:49:17 +02:00
parent 03c5baf35c
commit c658a997f3
No known key found for this signature in database

View File

@ -233,7 +233,7 @@ impl<'a> ListState<'a> {
)?;
next_ln(stdout)?;
let hotkey = |writer: &mut MaxLenWriter, hotkey| -> io::Result<()> {
fn hotkey(writer: &mut MaxLenWriter, hotkey: &[u8]) -> io::Result<()> {
writer
.stdout
.queue(SetForegroundColor(Color::Yellow))?
@ -241,7 +241,7 @@ impl<'a> ListState<'a> {
writer.write_ascii(hotkey)?;
writer.stdout.queue(ResetColor)?;
Ok(())
};
}
let mut writer = MaxLenWriter::new(stdout, self.term_width as usize);
if self.message.is_empty() {