From fd4fd02f04abc3113ae08fab1505db2f86b1b472 Mon Sep 17 00:00:00 2001 From: Zhouqi Jiang Date: Thu, 7 Dec 2023 15:26:51 +0800 Subject: [PATCH] base: small fix on `Version` Signed-off-by: Zhouqi Jiang --- src/base.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base.rs b/src/base.rs index d100a81..67e29e8 100644 --- a/src/base.rs +++ b/src/base.rs @@ -27,13 +27,13 @@ impl Version { /// Reads major version of specification. #[inline] - pub const fn major(&self) -> usize { + pub const fn major(self) -> usize { (self.raw >> 24) & ((1 << 7) - 1) } /// Reads minor version of specification. #[inline] - pub const fn minor(&self) -> usize { + pub const fn minor(self) -> usize { self.raw & ((1 << 24) - 1) } }