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

add "Deny All" Dns Resolver #344

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

add "Deny All" Dns Resolver #344

wants to merge 2 commits into from

Conversation

parkma99
Copy link

implement #329

Copy link
Member

@GlenDC GlenDC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good.
Can you apply these changes,
and pull it onto your machine.

You might need to run just qa to quickly check if all passes.
It will also auto format in case there is some formatting to be done.

Should you not have just on your machine you probably can find install instructions
on https://just.systems/man/en/installation.html or for this instance you might get away to just check if cargo fmt --all doesn't give you new changes to commit.

If not too much to ask you can also squash your commits, but if not, also not ok, for now I'm still okay either way, it's what you want.

use crate::DnsResolver;

#[derive(Debug, Clone)]
pub struct DenyAllDns {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pub struct DenyAllDns {}
#[non_exhaustive]
/// a [`DnsResolver`] implementation which
/// denies all incoming DNS requests with a [`DnsDeniedError`].
pub struct DenyAllDns;
impl DenyAllDns {
#[inline]
/// Create a new [`Default`] [`DenyAllDns`].
pub fn new() -> Self {
Self::default()
}
}


use crate::DnsResolver;

#[derive(Debug, Clone)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Default)]

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.

2 participants