Merge pull request #159 from erickt/deser2
Simplify metadata construction with builders
diff --git a/Cargo.toml b/Cargo.toml
index cdad101..3ee3034 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -37,4 +37,3 @@
[dev-dependencies]
lazy_static = "1"
maplit = "1"
-tempdir = "0.3"
diff --git a/src/lib.rs b/src/lib.rs
index 761519d..2db0275 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -131,8 +131,6 @@
#[macro_use]
extern crate serde_json as json;
-#[cfg(test)]
-extern crate tempdir;
extern crate tempfile;
extern crate untrusted;
diff --git a/src/repository.rs b/src/repository.rs
index 1bfb705..2878ef0 100644
--- a/src/repository.rs
+++ b/src/repository.rs
@@ -502,7 +502,7 @@
mod test {
use super::*;
use interchange::Json;
- use tempdir::TempDir;
+ use tempfile;
#[test]
fn ephemeral_repo_targets() {
@@ -527,7 +527,7 @@
#[test]
fn file_system_repo_targets() {
- let temp_dir = TempDir::new("rust-tuf").unwrap();
+ let temp_dir = tempfile::Builder::new().prefix("rust-tuf").tempdir().unwrap();
let repo = FileSystemRepository::<Json>::new(temp_dir.path().to_path_buf()).unwrap();
// test that init worked