Apply clippy lint available with MSRV 1.82.0

This commit is contained in:
cyqsimon
2025-07-10 11:51:17 +08:00
parent 2a61fd8f03
commit c28b94ae98

View File

@@ -23,8 +23,7 @@ use crate::{
};
pub fn sleep_and_quit_events(sleep_num: usize) -> Box<TerminalEvents> {
let events = iter::repeat(None)
.take(sleep_num)
let events = iter::repeat_n(None, sleep_num)
.chain([Some(Event::Key(KeyEvent::new(
KeyCode::Char('c'),
KeyModifiers::CONTROL,