diff options
author | Joe Wilm <joe@jwilm.com> | 2016-12-16 22:13:51 -0800 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-12-16 22:13:51 -0800 |
commit | dc918ae71a5e6c78a77994d7ce106a2253918c54 (patch) | |
tree | 537c7d13443e18ed657398f4eca0bf921ef4ac5e /src/meter.rs | |
parent | 3b995ff87a54239ecacb95d51f65c17504a8d22c (diff) | |
download | alacritty-dc918ae71a5e6c78a77994d7ce106a2253918c54.tar.gz alacritty-dc918ae71a5e6c78a77994d7ce106a2253918c54.zip |
Rustup and clippy
All of the changes in this commit are due to clippy lints.
Diffstat (limited to 'src/meter.rs')
-rw-r--r-- | src/meter.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/meter.rs b/src/meter.rs index b4bab5ff..2dc2ed21 100644 --- a/src/meter.rs +++ b/src/meter.rs @@ -36,6 +36,7 @@ use std::time::{Instant, Duration}; const NUM_SAMPLES: usize = 10; /// The meter +#[derive(Default)] pub struct Meter { /// Track last 60 timestamps times: [f64; NUM_SAMPLES], @@ -83,11 +84,7 @@ impl<'a> Drop for Sampler<'a> { impl Meter { /// Create a meter pub fn new() -> Meter { - Meter { - times: [0.0; NUM_SAMPLES], - avg: 0.0, - index: 0, - } + Default::default() } /// Get a sampler |