From 695be394428384e674f189b69bf6fd5fa11c0f42 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Sun, 12 May 2024 13:55:33 +0200 Subject: [PATCH] recursor: rename Recursor::new() to builder() --- crates/recursor/src/recursor.rs | 5 ++--- crates/server/src/store/recursor/authority.rs | 2 +- util/src/bin/recurse.rs | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/crates/recursor/src/recursor.rs b/crates/recursor/src/recursor.rs index 99a72a1ad..4110c97bc 100644 --- a/crates/recursor/src/recursor.rs +++ b/crates/recursor/src/recursor.rs @@ -108,9 +108,8 @@ pub struct Recursor { } impl Recursor { - /// Short-hand for `RecursorBuilder::default` - #[allow(clippy::new_ret_no_self)] - pub fn new() -> RecursorBuilder { + /// Construct the new [`Recursor`] via the [`RecursorBuilder`] + pub fn builder() -> RecursorBuilder { RecursorBuilder::default() } diff --git a/crates/server/src/store/recursor/authority.rs b/crates/server/src/store/recursor/authority.rs index 3211306f8..1d321ee27 100644 --- a/crates/server/src/store/recursor/authority.rs +++ b/crates/server/src/store/recursor/authority.rs @@ -73,7 +73,7 @@ impl RecursiveAuthority { }); } - let mut recursor = Recursor::new(); + let mut recursor = Recursor::builder(); recursor .ns_cache_size(config.ns_cache_size) .record_cache_size(config.record_cache_size); diff --git a/util/src/bin/recurse.rs b/util/src/bin/recurse.rs index 1bb10eb2b..9b55e6abe 100644 --- a/util/src/bin/recurse.rs +++ b/util/src/bin/recurse.rs @@ -157,7 +157,7 @@ pub async fn main() -> Result<(), Box> { let name = opts.domainname; let ty = opts.ty; - let recursor = Recursor::new().build(roots)?; + let recursor = Recursor::builder().build(roots)?; // execute query println!(