Skip to content

Commit 6f443d2

Browse files
Fix inconsistency
1 parent 52994b8 commit 6f443d2

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/skip.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ impl InterleavedAroundWithMax {
4848
/// - inclusive_min <= around <= exclusive_max
4949
#[must_use]
5050
pub fn new(around: usize, inclusive_min: usize, exclusive_max: NonZeroUsize) -> Self {
51+
assert!(inclusive_min < exclusive_max.get());
52+
assert!(inclusive_min <= around && around <= exclusive_max.get());
53+
5154
Self {
5255
around,
5356
inclusive_min,

0 commit comments

Comments
 (0)