Skip to content

Commit

Permalink
Feature-gate UInt::one
Browse files Browse the repository at this point in the history
  • Loading branch information
dhardy committed Feb 13, 2024
1 parent d1cf139 commit e13ca34
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/seq/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ where R: Rng + ?Sized {
trait UInt: Copy + PartialOrd + Ord + PartialEq + Eq + SampleUniform
+ core::hash::Hash + core::ops::AddAssign {
fn zero() -> Self;
#[cfg(feature = "std")]
fn one() -> Self;
fn as_usize(self) -> usize;
}
Expand All @@ -433,6 +434,7 @@ impl UInt for u32 {
0
}

#[cfg(feature = "std")]
#[inline]
fn one() -> Self {
1
Expand All @@ -449,6 +451,7 @@ impl UInt for usize {
0
}

#[cfg(feature = "std")]
#[inline]
fn one() -> Self {
1
Expand Down

0 comments on commit e13ca34

Please sign in to comment.