From 5de9653ee6db762c57025f5fc231ea42fdb4e35f Mon Sep 17 00:00:00 2001 From: Ruediger Klaehn Date: Mon, 24 Oct 2022 17:56:33 +0300 Subject: [PATCH] refactor: a few fixes to make clippy happy --- iroh-api/Cargo.toml | 1 - iroh-resolver/src/unixfs_builder.rs | 3 +-- iroh-store/src/config.rs | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/iroh-api/Cargo.toml b/iroh-api/Cargo.toml index 5ef6516c82..c522f95ac9 100644 --- a/iroh-api/Cargo.toml +++ b/iroh-api/Cargo.toml @@ -32,4 +32,3 @@ thiserror = "1.0" [dev-dependencies] tempfile = "3.3.0" -tempdir = "0.3.7" diff --git a/iroh-resolver/src/unixfs_builder.rs b/iroh-resolver/src/unixfs_builder.rs index 83fddb8c6e..3f1e94f8ca 100644 --- a/iroh-resolver/src/unixfs_builder.rs +++ b/iroh-resolver/src/unixfs_builder.rs @@ -683,7 +683,6 @@ mod tests { use rand::prelude::*; use rand_chacha::ChaCha8Rng; use std::{collections::BTreeMap, io::prelude::*, sync::Arc}; - use tempfile; use tokio::io::AsyncReadExt; #[tokio::test] @@ -974,7 +973,7 @@ mod tests { #[cfg(not(windows))] #[tokio::test] async fn symlink_from_disk_test() -> Result<()> { - let temp_dir = tempfile::tempdir()?; + let temp_dir = tempfile::tempfile::tempdir()?; let expect_name = "path_to_symlink"; let expect_target = temp_dir.path().join("path_to_target"); let expect_path = temp_dir.path().join(expect_name); diff --git a/iroh-store/src/config.rs b/iroh-store/src/config.rs index 021fc2817a..8984e75c95 100644 --- a/iroh-store/src/config.rs +++ b/iroh-store/src/config.rs @@ -94,7 +94,6 @@ impl Source for Config { #[cfg(test)] mod tests { use super::*; - use config::Config as ConfigBuilder; #[test] #[cfg(all(feature = "rpc-grpc", unix))] @@ -129,7 +128,7 @@ mod tests { fn test_build_config_from_struct() { let path = PathBuf::new().join("test"); let expect = Config::new_grpc(path); - let got: Config = ConfigBuilder::builder() + let got: Config = config::Config::builder() .add_source(expect.clone()) .build() .unwrap()