Formatting issues

This commit is contained in:
Marcus Butler 2023-12-25 10:24:55 -06:00 committed by Benjamin Fry
parent b414fe8d78
commit 0d965da4b1
3 changed files with 13 additions and 5 deletions

View File

@ -49,7 +49,11 @@ impl Recursor {
/// # Panics
///
/// This will panic if the roots are empty.
pub fn new(roots: impl Into<NameServerConfigGroup>, ns_cache_size: usize, record_cache_size: usize) -> Result<Self, ResolveError> {
pub fn new(
roots: impl Into<NameServerConfigGroup>,
ns_cache_size: usize,
record_cache_size: usize,
) -> Result<Self, ResolveError> {
// configure the hickory-resolver
let roots: NameServerConfigGroup = roots.into();

View File

@ -73,8 +73,8 @@ impl RecursiveAuthority {
});
}
let recursor =
Recursor::new(roots, config.ns_cache_size, config.record_cache_size).map_err(|e| format!("failed to initialize recursor: {e}"))?;
let recursor = Recursor::new(roots, config.ns_cache_size, config.record_cache_size)
.map_err(|e| format!("failed to initialize recursor: {e}"))?;
Ok(Self {
origin: origin.into(),

View File

@ -66,5 +66,9 @@ impl RecursiveConfig {
}
}
fn ns_cache_size_default() -> usize { 1024 }
fn record_cache_size_default() -> usize { 1048576 }
fn ns_cache_size_default() -> usize {
1024
}
fn record_cache_size_default() -> usize {
1048576
}