diff --git a/tests/common/macros.rs b/tests/common/macros.rs index 54fbcab58..e36fdffdc 100644 --- a/tests/common/macros.rs +++ b/tests/common/macros.rs @@ -61,8 +61,6 @@ macro_rules! new_ucmd { macro_rules! at_and_ucmd { () => ({ let ts = TestScenario::new(util_name!()); - #[allow(unused_mut)] - let mut ucmd = ts.ucmd(); - (ts.fixtures, ucmd) + (ts.fixtures.clone(), ts.ucmd()) }) } diff --git a/tests/common/util.rs b/tests/common/util.rs index da05d4c38..3c20fdb2c 100644 --- a/tests/common/util.rs +++ b/tests/common/util.rs @@ -181,6 +181,7 @@ pub fn get_root_path() -> &'static str { /// Object-oriented path struct that represents and operates on /// paths relative to the directory it was constructed for. +#[derive(Clone)] pub struct AtPath { pub subdir: PathBuf, }