summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-08-22 14:13:28 +0200
committerJustus Winter <justus@sequoia-pgp.org>2019-08-22 14:13:28 +0200
commita0c53a87a961a37d5d1a63178bb7d41463665ccc (patch)
treef030bb863311e84a7407b9f16d57f1aac986fa0e /core
parentb68079c8e6e9edb5f0e7b0e4ce9fa52b34da4493 (diff)
core: Use 'tempfile' instead of 'tempdir'.
- The latter crate has been deprecated and merged into the former.
Diffstat (limited to 'core')
-rw-r--r--core/Cargo.toml2
-rw-r--r--core/src/lib.rs5
2 files changed, 3 insertions, 4 deletions
diff --git a/core/Cargo.toml b/core/Cargo.toml
index 5b075e9a..413aae2c 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -24,4 +24,4 @@ maintenance = { status = "actively-developed" }
[dependencies]
dirs = "2.0"
failure = "0.1.2"
-tempdir = "0.3.5"
+tempfile = "3.1"
diff --git a/core/src/lib.rs b/core/src/lib.rs
index 55b2ec71..1fda8453 100644
--- a/core/src/lib.rs
+++ b/core/src/lib.rs
@@ -19,14 +19,13 @@
/// ```
extern crate dirs;
-extern crate tempdir;
+extern crate tempfile;
#[macro_use]
extern crate failure;
use std::fmt;
use std::io;
use std::path::{Path, PathBuf};
-use tempdir::TempDir;
/// A `Context` for Sequoia.
///
@@ -193,7 +192,7 @@ impl Config {
// share home directories, e.g. client and server processes
// share one home.
if c.ephemeral && home_not_set {
- let tmp = TempDir::new("sequoia")?;
+ let tmp = tempfile::Builder::new().prefix("sequoia").tempdir()?;
c.home = tmp.into_path();
c.cleanup = true;
} else {