Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize TrustDnsResolver #1967

Merged
merged 4 commits into from Sep 4, 2023

Conversation

NobodyXu
Copy link
Contributor

@NobodyXu NobodyXu commented Sep 4, 2023

  • Replace use of tokio::sync::Mutex with once_cell::sync::OnceCell
    since there's no need for it to be async and thus it can just use
    OnceCell instead of Mutex.
  • Optimize TrustDnsResolver: Rm use of Lazy
  • Optimize TrustDnsResolver: Rm unnecessary Arc
  • Derive Default on TrustDnsResolver

Replace use of `tokio::sync::Mutex` with `once_cell::sync::OnceCell`
since there's no need for it to be `async` and thus it can just use
`OnceCell` instead of `Mutex`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
instead of implementing `TrustDnsResolver::new()`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@seanmonstar seanmonstar merged commit d3d95a5 into seanmonstar:master Sep 4, 2023
31 checks passed
@NobodyXu NobodyXu deleted the optimize/trust-dns branch September 4, 2023 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants