Implement dig command #4

Merged
lemon merged 2 commits from feat/dns_lookups into master 2023-02-08 20:52:39 +01:00
There is no content yet.
famfo added 1 commit 2023-02-08 20:43:52 +01:00
lemon requested changes 2023-02-08 20:49:32 +01:00
lemon left a comment
Owner

minor nitpicks, other than that looks good

minor nitpicks, other than that looks good
@ -0,0 +14,4 @@
pub fn new(server: Option<String>) -> anyhow::Result<Self> {
let resolver = if let Some(server) = server {
let mut resolver_config = ResolverConfig::new();
let nserver = format!("{server}:53").parse().expect("Failed to parse DNS server address");

why not return the error here instead of unwrapping? this function returns an anyhow::Result

why not return the error here instead of unwrapping? this function returns an anyhow::Result
famfo marked this conversation as resolved
@ -0,0 +29,4 @@
async fn execute(&self, msg: CommandContext) -> anyhow::Result<String> {
if let Some(msg) = msg.content {
let mut builder = String::new();
let parts = msg.split_ascii_whitespace().collect::<Vec<&str>>();

I don't see why you'd use turbofish here, it will look better if you just specify the type explicitly.

I don't see why you'd use turbofish here, it will look better if you just specify the type explicitly.
famfo marked this conversation as resolved
famfo added 1 commit 2023-02-08 20:51:45 +01:00
lemon merged commit 592f7e44fd into master 2023-02-08 20:52:39 +01:00
lemon referenced this issue from a commit 2023-02-08 20:52:39 +01:00
famfo deleted branch feat/dns_lookups 2023-02-08 20:52:46 +01:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: C4TG1RL5/uberbot#4
There is no content yet.