Skip to content

Commit

Permalink
path: the if-else block looked unusual
Browse files Browse the repository at this point in the history
  • Loading branch information
tshepang committed Aug 26, 2015
1 parent 7472886 commit 933eb3e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/libstd/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,11 @@ impl<'a> Components<'a> {
/// how much of the prefix is left from the point of view of iteration?
#[inline]
fn prefix_remaining(&self) -> usize {
if self.front == State::Prefix { self.prefix_len() }
else { 0 }
if self.front == State::Prefix {
self.prefix_len()
} else {
0
}
}

// Given the iteration so far, how much of the pre-State::Body path is left?
Expand Down

0 comments on commit 933eb3e

Please sign in to comment.