From 933eb3e320fe6e6c06d182f52c3e599b7e5a46c3 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Wed, 26 Aug 2015 23:15:51 +0200 Subject: [PATCH] path: the if-else block looked unusual --- src/libstd/path.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 71aed0408711e..08be959de086a 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -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?