mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 03:33:59 +00:00
commit
4b102fde2c
@ -66,7 +66,11 @@ where
|
||||
P: AsRef<Path>,
|
||||
{
|
||||
(0..path.components().count())
|
||||
.map(|i| path.components().take(i))
|
||||
.map(|i| {
|
||||
path.components()
|
||||
.skip(i)
|
||||
.take(subpath.as_ref().components().count())
|
||||
})
|
||||
.any(|c| c.zip(subpath.as_ref().components()).all(|(a, b)| a == b))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user