diff --git a/Cargo.toml b/Cargo.toml index 9993771..3023a4d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "term_snake" +name = "term-snake" version = "0.1.0" edition = "2021" diff --git a/src/main.rs b/src/main.rs index 0f0bede..906b386 100644 --- a/src/main.rs +++ b/src/main.rs @@ -111,7 +111,7 @@ fn change_dir(direction: &mut Direction, now: &Instant) { fn key_input(now: &Instant) -> Option { while now.elapsed() < FRAME_TIME { - if poll(Duration::from_secs(0)).ok()? { + if poll(Duration::MAX).ok()? { if let Event::Key(k) = read().ok()? { if let KeyCode::Char(c) = k.code { return Some(c);