1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-07-06 06:27:36 +02:00

printer: clean-up

Like a previous commit did for the grep-cli crate, this does some
polishing to the grep-printer crate. We aren't able to achieve as much
as we did with grep-cli, but we at least eliminate all rust-analyzer
lints and group imports in the way I've been doing recently.

Next we'll start doing some more invasive changes.
This commit is contained in:
Andrew Gallant
2023-09-21 16:57:02 -04:00
parent 25a7145c79
commit 09905560ff
13 changed files with 291 additions and 258 deletions

View File

@ -1,5 +1,7 @@
use std::ops::{Add, AddAssign};
use std::time::Duration;
use std::{
ops::{Add, AddAssign},
time::Duration,
};
use crate::util::NiceDuration;
@ -8,7 +10,7 @@ use crate::util::NiceDuration;
/// When statistics are reported by a printer, they correspond to all searches
/// executed with that printer.
#[derive(Clone, Debug, Default, PartialEq, Eq)]
#[cfg_attr(feature = "serde1", derive(serde::Serialize))]
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
pub struct Stats {
elapsed: NiceDuration,
searches: u64,