Skip to content

Commit

Permalink
recursor: rename Recursor::new() to builder()
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed May 12, 2024
1 parent ba29c88 commit 695be39
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions crates/recursor/src/recursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
2 changes: 1 addition & 1 deletion crates/server/src/store/recursor/authority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion util/src/bin/recurse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ pub async fn main() -> Result<(), Box<dyn std::error::Error>> {
let name = opts.domainname;
let ty = opts.ty;

let recursor = Recursor::new().build(roots)?;
let recursor = Recursor::builder().build(roots)?;

// execute query
println!(
Expand Down

0 comments on commit 695be39

Please sign in to comment.