chore: fix 2024-03-05 nightly clippy warnings

This commit is contained in:
link2xt
2024-03-06 23:01:15 +00:00
parent 2c5a0cac5f
commit 2030de11d9
28 changed files with 26 additions and 71 deletions

View File

@@ -64,7 +64,7 @@
use std::cmp::max;
use std::collections::BTreeSet;
use std::convert::{TryFrom, TryInto};
use std::fmt;
use std::num::ParseIntError;
use std::str::FromStr;
use std::time::{Duration, UNIX_EPOCH};
@@ -131,9 +131,9 @@ impl Default for Timer {
}
}
impl ToString for Timer {
fn to_string(&self) -> String {
self.to_u32().to_string()
impl fmt::Display for Timer {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", self.to_u32())
}
}