Skip to content

Commit deabba6

Browse files
committed
accept paths in scripted_fixture_writable
1 parent 91cae4f commit deabba6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/tools/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ pub fn scripted_fixture_read_only_standalone(script_name: impl AsRef<Path>) -> R
284284
/// the tempdir is returned. It will be removed automatically, courtesy of [`tempfile::TempDir`].
285285
///
286286
/// Note that `script_name` is only executed once, so the data can be copied from its read-only location.
287-
pub fn scripted_fixture_writable(script_name: &str) -> Result<tempfile::TempDir> {
287+
pub fn scripted_fixture_writable(script_name: impl AsRef<Path>) -> Result<tempfile::TempDir> {
288288
scripted_fixture_writable_with_args(script_name, None::<String>, Creation::CopyFromReadOnly)
289289
}
290290

@@ -296,7 +296,7 @@ pub fn scripted_fixture_writable_standalone(script_name: &str) -> Result<tempfil
296296
/// Like [`scripted_fixture_writable()`], but passes `args` to `script_name` while providing control over
297297
/// the way files are created with `mode`.
298298
pub fn scripted_fixture_writable_with_args(
299-
script_name: &str,
299+
script_name: impl AsRef<Path>,
300300
args: impl IntoIterator<Item = impl Into<String>>,
301301
mode: Creation,
302302
) -> Result<tempfile::TempDir> {
@@ -313,7 +313,7 @@ pub fn scripted_fixture_writable_with_args_standalone(
313313
}
314314

315315
fn scripted_fixture_writable_with_args_inner(
316-
script_name: &str,
316+
script_name: impl AsRef<Path>,
317317
args: impl IntoIterator<Item = impl Into<String>>,
318318
mode: Creation,
319319
root: DirectoryRoot,

0 commit comments

Comments
 (0)