util: Clippy lints

This commit is contained in:
parazyd
2023-07-08 21:19:27 +02:00
parent 1f47600402
commit 968550a680
2 changed files with 7 additions and 1 deletions

View File

@@ -313,6 +313,12 @@ pub struct ProgressInc {
timer: Arc<Mutex<Option<Instant>>>,
}
impl Default for ProgressInc {
fn default() -> Self {
Self::new()
}
}
impl ProgressInc {
pub fn new() -> Self {
eprint!("\x1b[?25l");

View File

@@ -69,7 +69,7 @@ impl<T: Eq + PartialEq + Clone, const N: usize> RingBuffer<T, N> {
/// Cast the ringbuffer into a vec
pub fn to_vec(&self) -> Vec<T> {
self.0.iter().map(|x| x.clone()).collect()
self.0.iter().cloned().collect()
}
}