diff options
Diffstat (limited to 'tvix/castore')
-rw-r--r-- | tvix/castore/src/path.rs | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/tvix/castore/src/path.rs b/tvix/castore/src/path.rs index 3577ea80a4a9..2da1413c4836 100644 --- a/tvix/castore/src/path.rs +++ b/tvix/castore/src/path.rs @@ -210,11 +210,7 @@ mod test { #[case("foo2/bar2", "foo2")] #[case("foo/bar/baz", "foo/bar")] pub fn parent(#[case] p: PathBuf, #[case] exp_parent: PathBuf) { - assert_eq!(Some(exp_parent.as_ref()), p.parent()); - - // same for Path - let p = p.as_ref(); - assert_eq!(Some(exp_parent.as_ref()), p.parent()); + assert_eq!(Some(&*exp_parent), p.parent()); } #[rstest] @@ -232,11 +228,6 @@ mod test { #[case("a", "b", "a/b")] pub fn join(#[case] p: PathBuf, #[case] name: &str, #[case] exp_p: PathBuf) { assert_eq!(exp_p, p.join(name.as_bytes()).expect("join failed")); - // same for Path - assert_eq!( - exp_p, - p.as_ref().join(name.as_bytes()).expect("join failed") - ); } #[rstest] @@ -249,11 +240,6 @@ mod test { pub fn join_fail(#[case] p: PathBuf, #[case] name: &str) { p.join(name.as_bytes()) .expect_err("join succeeded unexpectedly"); - - // same for Path - p.as_ref() - .join(name.as_bytes()) - .expect_err("join succeeded unexpectedly"); } #[rstest] @@ -268,14 +254,5 @@ mod test { .map(|x| x.to_str().unwrap()) .collect::<Vec<_>>() ); - - // same for Path - let p = p.as_ref(); - assert_eq!( - exp_components, - p.components() - .map(|x| x.to_str().unwrap()) - .collect::<Vec<_>>() - ); } } |