chore: apply rustfmt to all crates (#917)

This commit is contained in:
Carl Lerche
2019-02-21 11:56:15 -08:00
committed by GitHub
parent ab595d0825
commit 80162306e7
253 changed files with 3710 additions and 3407 deletions
+7 -7
View File
@@ -2,9 +2,9 @@ use Delay;
use clock;
use futures::{Future, Stream, Poll};
use futures::{Future, Poll, Stream};
use std::time::{Instant, Duration};
use std::time::{Duration, Instant};
/// A stream representing notifications at fixed interval
#[derive(Debug)]
@@ -28,7 +28,10 @@ impl Interval {
///
/// This function panics if `duration` is zero.
pub fn new(at: Instant, duration: Duration) -> Interval {
assert!(duration > Duration::new(0, 0), "`duration` must be non-zero.");
assert!(
duration > Duration::new(0, 0),
"`duration` must be non-zero."
);
Interval::new_with_delay(Delay::new(at), duration)
}
@@ -47,10 +50,7 @@ impl Interval {
}
pub(crate) fn new_with_delay(delay: Delay, duration: Duration) -> Interval {
Interval {
delay,
duration,
}
Interval { delay, duration }
}
}