Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwilkinsonn committed Apr 24, 2021
1 parent 1d2ea75 commit 9213d20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
12 changes: 2 additions & 10 deletions library/std/src/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2224,11 +2224,7 @@ impl<T: Read, U: Read> Read for Chain<T, U> {

unsafe fn initializer(&self) -> Initializer {
let initializer = self.first.initializer();
if initializer.should_initialize() {
initializer
} else {
self.second.initializer()
}
if initializer.should_initialize() { initializer } else { self.second.initializer() }
}
}

Expand All @@ -2247,11 +2243,7 @@ impl<T: BufRead, U: BufRead> BufRead for Chain<T, U> {
}

fn consume(&mut self, amt: usize) {
if !self.done_first {
self.first.consume(amt)
} else {
self.second.consume(amt)
}
if !self.done_first { self.first.consume(amt) } else { self.second.consume(amt) }
}
}

Expand Down
6 changes: 1 addition & 5 deletions library/test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,7 @@ where
fn calc_timeout(timeout_queue: &VecDeque<TimeoutEntry>) -> Option<Duration> {
timeout_queue.front().map(|&TimeoutEntry { timeout: next_timeout, .. }| {
let now = Instant::now();
if next_timeout >= now {
next_timeout - now
} else {
Duration::new(0, 0)
}
if next_timeout >= now { next_timeout - now } else { Duration::new(0, 0) }
})
}

Expand Down

0 comments on commit 9213d20

Please sign in to comment.