diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 35118bde96bb9..e1393ce6aab97 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() {