Skip to content

Commit c658a99

Browse files
committed
Turn unnecessary closure into regular function
1 parent 03c5baf commit c658a99

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/list/state.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,15 @@ impl<'a> ListState<'a> {
233233
)?;
234234
next_ln(stdout)?;
235235

236-
let hotkey = |writer: &mut MaxLenWriter, hotkey| -> io::Result<()> {
236+
fn hotkey(writer: &mut MaxLenWriter, hotkey: &[u8]) -> io::Result<()> {
237237
writer
238238
.stdout
239239
.queue(SetForegroundColor(Color::Yellow))?
240240
.queue(SetAttribute(Attribute::Bold))?;
241241
writer.write_ascii(hotkey)?;
242242
writer.stdout.queue(ResetColor)?;
243243
Ok(())
244-
};
244+
}
245245

246246
let mut writer = MaxLenWriter::new(stdout, self.term_width as usize);
247247
if self.message.is_empty() {

0 commit comments

Comments
 (0)