mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
path: the if-else block looked unusual
This commit is contained in:
parent
7472886233
commit
933eb3e320
@ -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?
|
||||
|
Loading…
Reference in New Issue
Block a user