Rollup merge of #31878 - frewsxcv:path-cleanup, r=alexcrichton

None
This commit is contained in:
Manish Goregaokar 2016-02-26 15:12:17 +05:30
commit cefbe505bd

View File

@ -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,