1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

clone atpath to avoid borrow issue

This commit is contained in:
nathanross 2016-08-23 08:57:13 -04:00
parent aa6ee03be3
commit b667fce8ba
2 changed files with 2 additions and 3 deletions

View file

@ -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())
})
}

View file

@ -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,
}