about summary refs log tree commit diff
path: root/src/libstd/path.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-08-28 03:38:37 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-08-28 03:38:37 +0530
commitaebe352794bfe28ed62f0c4ffa17f5bbf3baeaca (patch)
treeed91321d105969168928276484fd2e733ba3e8a4 /src/libstd/path.rs
parentab3dc54bcf46c65b58440459868e8dc9b26f8d75 (diff)
parent933eb3e320fe6e6c06d182f52c3e599b7e5a46c3 (diff)
downloadrust-aebe352794bfe28ed62f0c4ffa17f5bbf3baeaca.tar.gz
rust-aebe352794bfe28ed62f0c4ffa17f5bbf3baeaca.zip
Rollup merge of #28029 - tshepang:unusual, r=steveklabnik
Diffstat (limited to 'src/libstd/path.rs')
-rw-r--r--src/libstd/path.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs
index b5e08752344..66893ffd330 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?