Skip to content

Commit

Permalink
Fix MSRV usage
Browse files Browse the repository at this point in the history
  • Loading branch information
GnomedDev committed Dec 2, 2024
1 parent 7a5adbd commit 9da7b44
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/length.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl TryFrom<InvalidLength<u8>> for InvalidStrLength {
pub trait NonZero<Int: ValidLength>:
sealed::NonZeroSealed + Into<Int> + Sized + Copy + PartialEq + Debug
{
#[expect(unused)]
#[allow(unused)]
fn new(val: Int) -> Option<Self>;
}

Expand Down Expand Up @@ -140,7 +140,7 @@ pub trait ValidLength:
const ZERO: Self;
const MAX: Self;
#[deprecated = "will be removed in the next major release"]
#[expect(deprecated)]
#[allow(deprecated)]
const DANGLING: Self::NonZero;

#[deprecated = "will be removed in the next major release"]
Expand All @@ -162,7 +162,7 @@ pub trait ValidLength:
impl ValidLength for u8 {
const ZERO: Self = 0;
const MAX: Self = Self::MAX;
#[expect(deprecated)]
#[allow(deprecated)]
const DANGLING: Self::NonZero = Self::NonZero::MAX;

type NonZero = NonZeroU8;
Expand All @@ -176,7 +176,7 @@ impl ValidLength for u8 {
impl ValidLength for u16 {
const ZERO: Self = 0;
const MAX: Self = Self::MAX;
#[expect(deprecated)]
#[allow(deprecated)]
const DANGLING: Self::NonZero = Self::NonZero::MAX;

type NonZero = NonZeroU16;
Expand All @@ -191,7 +191,7 @@ impl ValidLength for u16 {
impl ValidLength for u32 {
const ZERO: Self = 0;
const MAX: Self = Self::MAX;
#[expect(deprecated)]
#[allow(deprecated)]
const DANGLING: Self::NonZero = Self::NonZero::MAX;

type NonZero = NonZeroU32;
Expand Down

0 comments on commit 9da7b44

Please sign in to comment.