Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
base: small fix on Version
Browse files Browse the repository at this point in the history
Signed-off-by: Zhouqi Jiang <[email protected]>
  • Loading branch information
luojia65 committed Dec 7, 2023
1 parent 4258876 commit fd4fd02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit fd4fd02

Please sign in to comment.