diff --git a/crates/cargo-test-support/src/paths.rs b/crates/cargo-test-support/src/paths.rs index 806810b87..460ac3429 100644 --- a/crates/cargo-test-support/src/paths.rs +++ b/crates/cargo-test-support/src/paths.rs @@ -211,6 +211,26 @@ impl CargoPathExt for Path { } } +impl CargoPathExt for PathBuf { + fn rm_rf(&self) { + self.as_path().rm_rf() + } + fn mkdir_p(&self) { + self.as_path().mkdir_p() + } + + fn ls_r(&self) -> Vec { + self.as_path().ls_r() + } + + fn move_in_time(&self, travel_amount: F) + where + F: Fn(i64, u32) -> (i64, u32), + { + self.as_path().move_in_time(travel_amount) + } +} + fn do_op(path: &Path, desc: &str, mut f: F) where F: FnMut(&Path) -> io::Result<()>,