Skip to content

Commit 9ca1b18

Browse files
committed
change bounds from block_size <= 255 to block_size < 256
1 parent 2e1dcce commit 9ca1b18

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

block-buffer/src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub use generic_array;
1111

1212
use core::{marker::PhantomData, slice};
1313
use generic_array::{
14-
typenum::{IsLessOrEqual, LeEq, NonZero, U255},
14+
typenum::{IsLess, Le, NonZero, U256},
1515
ArrayLength, GenericArray,
1616
};
1717

@@ -45,8 +45,8 @@ pub type LazyBuffer<B> = BlockBuffer<B, Lazy>;
4545
#[derive(Default, Clone, Debug)]
4646
pub struct BlockBuffer<BlockSize, Kind>
4747
where
48-
BlockSize: ArrayLength<u8> + IsLessOrEqual<U255>,
49-
LeEq<BlockSize, U255>: NonZero,
48+
BlockSize: ArrayLength<u8> + IsLess<U256>,
49+
Le<BlockSize, U256>: NonZero,
5050
Kind: BufferKind,
5151
{
5252
buffer: Block<BlockSize>,
@@ -56,8 +56,8 @@ where
5656

5757
impl<BlockSize, Kind> BlockBuffer<BlockSize, Kind>
5858
where
59-
BlockSize: ArrayLength<u8> + IsLessOrEqual<U255>,
60-
LeEq<BlockSize, U255>: NonZero,
59+
BlockSize: ArrayLength<u8> + IsLess<U256>,
60+
Le<BlockSize, U256>: NonZero,
6161
Kind: BufferKind,
6262
{
6363
/// Create new buffer from slice.
@@ -173,8 +173,8 @@ where
173173

174174
impl<BlockSize> BlockBuffer<BlockSize, Eager>
175175
where
176-
BlockSize: ArrayLength<u8> + IsLessOrEqual<U255>,
177-
LeEq<BlockSize, U255>: NonZero,
176+
BlockSize: ArrayLength<u8> + IsLess<U256>,
177+
Le<BlockSize, U256>: NonZero,
178178
{
179179
/// Set `data` to generated blocks.
180180
#[inline]

0 commit comments

Comments
 (0)