From 6c62c26d0df243b00914de22cb8d30a8ba3e3eb4 Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Wed, 1 Mar 2023 01:19:16 -0500 Subject: clippy my beloved --- packet/src/result.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'packet/src/result.rs') 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 -- cgit v1.2.3-freya