summaryrefslogtreecommitdiffstats
path: root/vendor/gix-fs/tests/stack/mod.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
commitc23a457e72abe608715ac76f076f47dc42af07a5 (patch)
tree2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /vendor/gix-fs/tests/stack/mod.rs
parentReleasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz
rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/gix-fs/tests/stack/mod.rs')
-rw-r--r--vendor/gix-fs/tests/stack/mod.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/vendor/gix-fs/tests/stack/mod.rs b/vendor/gix-fs/tests/stack/mod.rs
index 43eeac057..3e8cb7ade 100644
--- a/vendor/gix-fs/tests/stack/mod.rs
+++ b/vendor/gix-fs/tests/stack/mod.rs
@@ -29,13 +29,13 @@ impl gix_fs::stack::Delegate for Record {
#[test]
fn delegate_calls_are_consistent() -> crate::Result {
let root = PathBuf::from(".");
- let mut s = Stack::new(&root);
+ let mut s = Stack::new(root.clone());
assert_eq!(s.current(), root);
assert_eq!(s.current_relative(), Path::new(""));
let mut r = Record::default();
- s.make_relative_path_current("a/b", &mut r)?;
+ s.make_relative_path_current("a/b".as_ref(), &mut r)?;
let mut dirs = vec![root.clone(), root.join("a")];
assert_eq!(
r,
@@ -46,7 +46,7 @@ fn delegate_calls_are_consistent() -> crate::Result {
}
);
- s.make_relative_path_current("a/b2", &mut r)?;
+ s.make_relative_path_current("a/b2".as_ref(), &mut r)?;
assert_eq!(
r,
Record {
@@ -56,7 +56,7 @@ fn delegate_calls_are_consistent() -> crate::Result {
}
);
- s.make_relative_path_current("c/d/e", &mut r)?;
+ s.make_relative_path_current("c/d/e".as_ref(), &mut r)?;
dirs.pop();
dirs.extend([root.join("c"), root.join("c").join("d")]);
assert_eq!(
@@ -69,7 +69,7 @@ fn delegate_calls_are_consistent() -> crate::Result {
);
dirs.push(root.join("c").join("d").join("x"));
- s.make_relative_path_current("c/d/x/z", &mut r)?;
+ s.make_relative_path_current("c/d/x/z".as_ref(), &mut r)?;
assert_eq!(
r,
Record {
@@ -80,7 +80,7 @@ fn delegate_calls_are_consistent() -> crate::Result {
);
dirs.drain(dirs.len() - 3..).count();
- s.make_relative_path_current("f", &mut r)?;
+ s.make_relative_path_current("f".as_ref(), &mut r)?;
assert_eq!(s.current_relative(), Path::new("f"));
assert_eq!(
r,
@@ -92,7 +92,7 @@ fn delegate_calls_are_consistent() -> crate::Result {
);
dirs.push(root.join("x"));
- s.make_relative_path_current("x/z", &mut r)?;
+ s.make_relative_path_current("x/z".as_ref(), &mut r)?;
assert_eq!(
r,
Record {
@@ -103,7 +103,7 @@ fn delegate_calls_are_consistent() -> crate::Result {
);
dirs.push(root.join("x").join("z"));
- s.make_relative_path_current("x/z/a", &mut r)?;
+ s.make_relative_path_current("x/z/a".as_ref(), &mut r)?;
assert_eq!(
r,
Record {
@@ -115,7 +115,7 @@ fn delegate_calls_are_consistent() -> crate::Result {
dirs.push(root.join("x").join("z").join("a"));
dirs.push(root.join("x").join("z").join("a").join("b"));
- s.make_relative_path_current("x/z/a/b/c", &mut r)?;
+ s.make_relative_path_current("x/z/a/b/c".as_ref(), &mut r)?;
assert_eq!(
r,
Record {
@@ -126,7 +126,7 @@ fn delegate_calls_are_consistent() -> crate::Result {
);
dirs.drain(dirs.len() - 2..).count();
- s.make_relative_path_current("x/z", &mut r)?;
+ s.make_relative_path_current("x/z".as_ref(), &mut r)?;
assert_eq!(
r,
Record {