Skip to content

Commit eccd13a

Browse files
committed
Adapt gix-config tests to changes in tempfile
`tempfile` version 3.20.0 introduces the clearer name `TempDir::keep()` for `TempDir::into_path()`, deprecating the latter. This commit changes calls in `gix-config` tests to use `keep()`, fixing new `clippy` errors.
1 parent 151e3a5 commit eccd13a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

gix-config/tests/config/file/init/from_paths/includes/conditional/gitdir/util.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ pub fn assert_section_value(
143143
None => None,
144144
},
145145
"gix-config disagrees with the expected value, {} for debugging",
146-
env.tempdir.into_path().display()
146+
env.tempdir.keep().display()
147147
);
148148
assure_git_agrees(expected, env)
149149
}
@@ -173,7 +173,7 @@ fn assure_git_agrees(expected: Option<Value>, env: GitEnv) -> crate::Result {
173173
expected.is_some(),
174174
"{:?}, {} for debugging",
175175
output,
176-
env.tempdir.into_path().display()
176+
env.tempdir.keep().display()
177177
);
178178
let git_output: BString = output.stdout.trim_end().into();
179179
assert_eq!(
@@ -184,7 +184,7 @@ fn assure_git_agrees(expected: Option<Value>, env: GitEnv) -> crate::Result {
184184
None => "",
185185
},
186186
"git disagrees with gix-config, {:?} for debugging",
187-
env.tempdir.into_path()
187+
env.tempdir.keep()
188188
);
189189
Ok(())
190190
}

gix-config/tests/config/file/init/from_paths/includes/conditional/onbranch.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ value = branch-override-by-include
265265
dir,
266266
gix_testtools::tempfile::TempDir::new().expect("substitute can be created"),
267267
);
268-
dir.into_path()
268+
dir.keep()
269269
}
270270
);
271271

@@ -290,7 +290,7 @@ fn assure_git_agrees(expected: Value, dir: &mut gix_testtools::tempfile::TempDir
290290
dir,
291291
gix_testtools::tempfile::TempDir::new().expect("substitute can be created"),
292292
);
293-
dir.into_path()
293+
dir.keep()
294294
};
295295
assert!(
296296
output.status.success(),

0 commit comments

Comments
 (0)