-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#[derive(Debug, Clone)] | |
#[derive(Debug, Clone, Default)] |
implement #329