diff --git a/russh-keys/Cargo.toml b/russh-keys/Cargo.toml index f9a721da..99764c63 100644 --- a/russh-keys/Cargo.toml +++ b/russh-keys/Cargo.toml @@ -82,5 +82,5 @@ pageant = { version = "0.0.1-beta.3", path = "../pageant" } [dev-dependencies] env_logger = "0.11" -tempdir = "0.3" +tempfile = "3.14.0" tokio = { workspace = true, features = ["test-util", "macros", "process"] } diff --git a/russh-keys/src/known_hosts.rs b/russh-keys/src/known_hosts.rs index 7aad1987..0cc94478 100644 --- a/russh-keys/src/known_hosts.rs +++ b/russh-keys/src/known_hosts.rs @@ -194,7 +194,7 @@ mod test { #[test] fn test_check_known_hosts() { env_logger::try_init().unwrap_or(()); - let dir = tempdir::TempDir::new("russh").unwrap(); + let dir = tempfile::tempdir().unwrap(); let path = dir.path().join("known_hosts"); { let mut f = File::create(&path).unwrap(); diff --git a/russh-keys/src/lib.rs b/russh-keys/src/lib.rs index b48b4596..5744c3b5 100644 --- a/russh-keys/src/lib.rs +++ b/russh-keys/src/lib.rs @@ -834,7 +834,7 @@ Cog3JMeTrb3LiPHgN6gU2P30MRp6L1j1J/MtlOAr5rux env_logger::try_init().unwrap_or(()); use std::process::Stdio; - let dir = tempdir::TempDir::new("russh")?; + let dir = tempfile::tempdir()?; let agent_path = dir.path().join("agent"); let mut agent = tokio::process::Command::new("ssh-agent") .arg("-a") @@ -901,7 +901,7 @@ Cog3JMeTrb3LiPHgN6gU2P30MRp6L1j1J/MtlOAr5rux #[cfg(unix)] fn test_agent() { env_logger::try_init().unwrap_or(()); - let dir = tempdir::TempDir::new("russh").unwrap(); + let dir = tempfile::tempdir().unwrap(); let agent_path = dir.path().join("agent"); let core = tokio::runtime::Runtime::new().unwrap();