summaryrefslogtreecommitdiffstats
path: root/src/testutils.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/testutils.rs')
-rw-r--r--src/testutils.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/testutils.rs b/src/testutils.rs
index 0b1da83..1cc3fd4 100644
--- a/src/testutils.rs
+++ b/src/testutils.rs
@@ -1,15 +1,17 @@
+use assert_fs::fixture::{ChildPath, FixtureError};
use assert_fs::prelude::*;
use assert_fs::TempDir;
-use assert_fs::fixture::{ChildPath, FixtureError};
-use std::path::{PathBuf,Path};
use std::fs;
+use std::path::{Path, PathBuf};
pub fn path_to(artifact: &str) -> PathBuf {
- [env!("CARGO_MANIFEST_DIR"), "testdata", artifact].iter().collect()
+ [env!("CARGO_MANIFEST_DIR"), "testdata", artifact]
+ .iter()
+ .collect()
}
pub fn touch_testfile(testdir: &TempDir, relative_path: &Path) -> Result<ChildPath, FixtureError> {
- let testfile = testdir.child(relative_path);
- testfile.touch()?;
- Ok(testfile)
+ let testfile = testdir.child(relative_path);
+ testfile.touch()?;
+ Ok(testfile)
}