diff options
| author | bors <bors@rust-lang.org> | 2016-02-26 11:36:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-02-26 11:36:35 +0000 |
| commit | ee8b257d2e8a5b396ca8e8843756a1d662c8a550 (patch) | |
| tree | 0dfadb3c34406724a5ea82b7a6a30553760f2c9d /src/libstd/path.rs | |
| parent | 09130044ce7429beb95742afa7fd371960dbe607 (diff) | |
| parent | 3c9a26853cca8783892d5b2373e9de63b5f488b5 (diff) | |
| download | rust-ee8b257d2e8a5b396ca8e8843756a1d662c8a550.tar.gz rust-ee8b257d2e8a5b396ca8e8843756a1d662c8a550.zip | |
Auto merge of #31911 - Manishearth:rollup, r=Manishearth
- Successful merges: #31878, #31880, #31883, #31893, #31894, #31896, #31901, #31904 - Failed merges: #31897
Diffstat (limited to 'src/libstd/path.rs')
| -rw-r--r-- | src/libstd/path.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 35118bde96b..94967bfb96a 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -226,7 +226,7 @@ mod platform { } _ => (), } - } else if path.len() > 1 && path[1] == b':' { + } else if path.get(1) == Some(& b':') { // C: let c = path[0]; if c.is_ascii() && (c as char).is_alphabetic() { @@ -393,11 +393,8 @@ fn iter_after<A, I, J>(mut iter: I, mut prefix: J) -> Option<I> loop { let mut iter_next = iter.clone(); match (iter_next.next(), prefix.next()) { - (Some(x), Some(y)) => { - if x != y { - return None; - } - } + (Some(ref x), Some(ref y)) if x == y => (), + (Some(_), Some(_)) => return None, (Some(_), None) => return Some(iter), (None, None) => return Some(iter), (None, Some(_)) => return None, |
