diff options
| author | Seiichi Uchida <seiichi.uchida@dena.com> | 2019-06-14 14:08:19 +0900 |
|---|---|---|
| committer | topecongiro <seuchida@gmail.com> | 2019-06-14 19:16:17 +0900 |
| commit | a4eab17d7c4cdeee1d0e72ea2a8a5f6a377627f2 (patch) | |
| tree | c3692ef65ba1dd2d0dd00473e02bcf8b9948a479 /src/test/mod.rs | |
| parent | dbac28b4b4f2adb135104593365943b3eab24685 (diff) | |
Fix is_subpath
Diffstat (limited to 'src/test/mod.rs')
| -rw-r--r-- | src/test/mod.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/test/mod.rs b/src/test/mod.rs index 2830f9aeff1..5ac0a1d4450 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -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)) } |
