fix test & clippy

This commit is contained in:
Boog900 2024-10-26 21:32:47 +01:00
parent d7d7541dae
commit cf34a8d2be
No known key found for this signature in database
GPG key ID: 42AB1287CB0041C2
4 changed files with 5 additions and 6 deletions

View file

@ -70,7 +70,7 @@ thread_local = { workspace = true }
tokio-util = { workspace = true } tokio-util = { workspace = true }
tokio-stream = { workspace = true } tokio-stream = { workspace = true }
tokio = { workspace = true } tokio = { workspace = true }
toml = { workspace = true, features = ["parse"]} toml = { workspace = true, features = ["parse", "display"]}
tower = { workspace = true } tower = { workspace = true }
tracing-subscriber = { workspace = true, features = ["std", "fmt", "default"] } tracing-subscriber = { workspace = true, features = ["std", "fmt", "default"] }
tracing = { workspace = true, features = ["default"] } tracing = { workspace = true, features = ["default"] }

View file

@ -15,7 +15,7 @@ fn test_cfg() -> AddressBookConfig {
AddressBookConfig { AddressBookConfig {
max_white_list_length: 100, max_white_list_length: 100,
max_gray_list_length: 500, max_gray_list_length: 500,
peer_store_file: PathBuf::new(), peer_store_folder: PathBuf::new(),
peer_save_period: Duration::from_secs(60), peer_save_period: Duration::from_secs(60),
} }
} }

View file

@ -7,7 +7,6 @@
//---------------------------------------------------------------------------------------------------- Use //---------------------------------------------------------------------------------------------------- Use
use std::{ use std::{
borrow::Cow,
collections::{HashMap, HashSet}, collections::{HashMap, HashSet},
sync::Arc, sync::Arc,
}; };
@ -46,7 +45,7 @@ fn init_service() -> (
) { ) {
let tempdir = tempfile::tempdir().unwrap(); let tempdir = tempfile::tempdir().unwrap();
let config = ConfigBuilder::new() let config = ConfigBuilder::new()
.db_directory(Cow::Owned(tempdir.path().into())) .db_directory(tempdir.path().into())
.low_power() .low_power()
.build(); .build();
let (reader, writer, env) = init(config).unwrap(); let (reader, writer, env) = init(config).unwrap();

View file

@ -5,7 +5,7 @@
//! - only used internally //! - only used internally
//---------------------------------------------------------------------------------------------------- Import //---------------------------------------------------------------------------------------------------- Import
use std::{borrow::Cow, fmt::Debug}; use std::fmt::Debug;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
@ -74,7 +74,7 @@ impl AssertTableLen {
pub(crate) fn tmp_concrete_env() -> (impl Env, tempfile::TempDir) { pub(crate) fn tmp_concrete_env() -> (impl Env, tempfile::TempDir) {
let tempdir = tempfile::tempdir().unwrap(); let tempdir = tempfile::tempdir().unwrap();
let config = ConfigBuilder::new() let config = ConfigBuilder::new()
.db_directory(Cow::Owned(tempdir.path().into())) .db_directory(tempdir.path().into())
.low_power() .low_power()
.build(); .build();
let env = crate::open(config).unwrap(); let env = crate::open(config).unwrap();