We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c85c5b commit 4c084c5Copy full SHA for 4c084c5
library/std/src/sys/windows/path.rs
@@ -147,12 +147,10 @@ pub fn parse_prefix(path: &OsStr) -> Option<Prefix<'_>> {
147
None
148
}
149
150
- } else if let Some(drive) = parse_drive(path) {
151
- // C:
152
- Some(Disk(drive))
153
} else {
154
- // no prefix
155
- None
+ // If it has a drive like `C:` then it's a disk.
+ // Otherwise there is no prefix.
+ parse_drive(path).map(Disk)
156
157
158
0 commit comments