Skip to content

Commit

Permalink
update set_option deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
leshow committed Jan 20, 2021
1 parent 8b0f90a commit bd74dfd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/tests/server_harness/mut_message_client.rs
Expand Up @@ -36,7 +36,7 @@ impl<C: ClientHandle + Unpin> DnsHandle for MutMessageHandle<C> {
edns.set_dnssec_ok(true);

if let Some(supported_algs) = self.support_algorithms {
edns.set_option(EdnsOption::DAU(supported_algs));
edns.options_mut().insert(EdnsOption::DAU(supported_algs));
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/proto/src/op/edns.rs
Expand Up @@ -115,7 +115,7 @@ impl Edns {
}

/// Set the specified EDNS option
#[deprecated(note = "Please use options_mut() to modify")]
#[deprecated(note = "Please use options_mut().insert() to modify")]
pub fn set_option(&mut self, option: EdnsOption) {
self.options.insert(option);
}
Expand Down
4 changes: 2 additions & 2 deletions crates/server/src/authority/catalog.rs
Expand Up @@ -59,8 +59,8 @@ fn send_response<R: ResponseHandler>(
let dau = EdnsOption::DAU(algorithms);
let dhu = EdnsOption::DHU(algorithms);

resp_edns.set_option(dau);
resp_edns.set_option(dhu);
resp_edns.options_mut().insert(dau);
resp_edns.options_mut().insert(dhu);

response.set_edns(resp_edns);
}
Expand Down

0 comments on commit bd74dfd

Please sign in to comment.