summaryrefslogtreecommitdiff
path: root/packet/src/result.rs
diff options
context:
space:
mode:
authorTyler Murphy <tylermurphy534@gmail.com>2023-03-01 01:19:16 -0500
committerTyler Murphy <tylermurphy534@gmail.com>2023-03-01 01:19:16 -0500
commit6c62c26d0df243b00914de22cb8d30a8ba3e3eb4 (patch)
treeb54f1285f3491f9821718686ed3982cdac19d57e /packet/src/result.rs
parentinital working dns (diff)
downloadwrapper-6c62c26d0df243b00914de22cb8d30a8ba3e3eb4.tar.gz
wrapper-6c62c26d0df243b00914de22cb8d30a8ba3e3eb4.tar.bz2
wrapper-6c62c26d0df243b00914de22cb8d30a8ba3e3eb4.zip
clippy my beloved
Diffstat (limited to 'packet/src/result.rs')
-rw-r--r--packet/src/result.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/packet/src/result.rs b/packet/src/result.rs
index 66108b8..f33bd7d 100644
--- a/packet/src/result.rs
+++ b/packet/src/result.rs
@@ -9,14 +9,14 @@ pub enum ResultCode {
}
impl ResultCode {
- pub fn from_num(num: u8) -> ResultCode {
+ pub fn from_num(num: u8) -> Self {
match num {
- 1 => ResultCode::FORMERR,
- 2 => ResultCode::SERVFAIL,
- 3 => ResultCode::NXDOMAIN,
- 4 => ResultCode::NOTIMP,
- 5 => ResultCode::REFUSED,
- 0 | _ => ResultCode::NOERROR,
+ 1 => Self::FORMERR,
+ 2 => Self::SERVFAIL,
+ 3 => Self::NXDOMAIN,
+ 4 => Self::NOTIMP,
+ 5 => Self::REFUSED,
+ 0 | _ => Self::NOERROR,
}
}
} \ No newline at end of file