Prefer slice::get
over length check with indexing.
This commit is contained in:
parent
0ef8d42605
commit
8adc3f74f5
1 changed files with 1 additions and 1 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue