aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/event.rs4
-rw-r--r--src/util/time.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/util/event.rs b/src/util/event.rs
index 05d8581..379df99 100644
--- a/src/util/event.rs
+++ b/src/util/event.rs
@@ -45,7 +45,7 @@ impl Events {
let stdin = io::stdin();
for key in stdin.keys().flatten() {
if let Err(err) = tx.send(Event::Input(key)) {
- eprintln!("{}", err);
+ eprintln!("{err}");
return;
}
}
@@ -54,7 +54,7 @@ impl Events {
let tick_handle = {
thread::spawn(move || loop {
if let Err(err) = tx.send(Event::Tick) {
- eprintln!("{}", err);
+ eprintln!("{err}");
break;
}
thread::sleep(config.tick_rate);
diff --git a/src/util/time.rs b/src/util/time.rs
index b8a85e6..679d1b4 100644
--- a/src/util/time.rs
+++ b/src/util/time.rs
@@ -31,9 +31,9 @@ pub fn pp_duration(seconds: u64) -> String {
fn plural(n: u64, str: &str) -> String {
if n <= 1 {
- format!("{} {}", n, str)
+ format!("{n} {str}")
} else {
- format!("{} {}s", n, str)
+ format!("{n} {str}s")
}
}