mirror of
https://github.com/hinto-janai/cuprate.git
synced 2025-01-21 18:24:31 +00:00
fix test & clippy
This commit is contained in:
parent
d7d7541dae
commit
cf34a8d2be
4 changed files with 5 additions and 6 deletions
|
@ -70,7 +70,7 @@ thread_local = { workspace = true }
|
|||
tokio-util = { workspace = true }
|
||||
tokio-stream = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
toml = { workspace = true, features = ["parse"]}
|
||||
toml = { workspace = true, features = ["parse", "display"]}
|
||||
tower = { workspace = true }
|
||||
tracing-subscriber = { workspace = true, features = ["std", "fmt", "default"] }
|
||||
tracing = { workspace = true, features = ["default"] }
|
||||
|
|
|
@ -15,7 +15,7 @@ fn test_cfg() -> AddressBookConfig {
|
|||
AddressBookConfig {
|
||||
max_white_list_length: 100,
|
||||
max_gray_list_length: 500,
|
||||
peer_store_file: PathBuf::new(),
|
||||
peer_store_folder: PathBuf::new(),
|
||||
peer_save_period: Duration::from_secs(60),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
//---------------------------------------------------------------------------------------------------- Use
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
collections::{HashMap, HashSet},
|
||||
sync::Arc,
|
||||
};
|
||||
|
@ -46,7 +45,7 @@ fn init_service() -> (
|
|||
) {
|
||||
let tempdir = tempfile::tempdir().unwrap();
|
||||
let config = ConfigBuilder::new()
|
||||
.db_directory(Cow::Owned(tempdir.path().into()))
|
||||
.db_directory(tempdir.path().into())
|
||||
.low_power()
|
||||
.build();
|
||||
let (reader, writer, env) = init(config).unwrap();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
//! - only used internally
|
||||
|
||||
//---------------------------------------------------------------------------------------------------- Import
|
||||
use std::{borrow::Cow, fmt::Debug};
|
||||
use std::fmt::Debug;
|
||||
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
|
@ -74,7 +74,7 @@ impl AssertTableLen {
|
|||
pub(crate) fn tmp_concrete_env() -> (impl Env, tempfile::TempDir) {
|
||||
let tempdir = tempfile::tempdir().unwrap();
|
||||
let config = ConfigBuilder::new()
|
||||
.db_directory(Cow::Owned(tempdir.path().into()))
|
||||
.db_directory(tempdir.path().into())
|
||||
.low_power()
|
||||
.build();
|
||||
let env = crate::open(config).unwrap();
|
||||
|
|
Loading…
Reference in a new issue