File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -237,20 +237,20 @@ impl<'a> Unstructured<'a> {
237
237
238
238
// We only consume as many bytes as necessary to cover the entire
239
239
// range of the byte string.
240
- // Note: We cast to u64 so we don't overflow when checking std:: u32::MAX + 4 on 32-bit archs
241
- let len = if self . data . len ( ) as u64 <= std :: u8:: MAX as u64 + 1 {
240
+ // Note: We cast to u64 so we don't overflow when checking u32::MAX + 4 on 32-bit archs
241
+ let len = if self . data . len ( ) as u64 <= u8:: MAX as u64 + 1 {
242
242
let bytes = 1 ;
243
243
let max_size = self . data . len ( ) - bytes;
244
244
let ( rest, for_size) = self . data . split_at ( max_size) ;
245
245
self . data = rest;
246
246
Self :: int_in_range_impl ( 0 ..=max_size as u8 , for_size. iter ( ) . copied ( ) ) ?. 0 as usize
247
- } else if self . data . len ( ) as u64 <= std :: u16:: MAX as u64 + 2 {
247
+ } else if self . data . len ( ) as u64 <= u16:: MAX as u64 + 2 {
248
248
let bytes = 2 ;
249
249
let max_size = self . data . len ( ) - bytes;
250
250
let ( rest, for_size) = self . data . split_at ( max_size) ;
251
251
self . data = rest;
252
252
Self :: int_in_range_impl ( 0 ..=max_size as u16 , for_size. iter ( ) . copied ( ) ) ?. 0 as usize
253
- } else if self . data . len ( ) as u64 <= std :: u32:: MAX as u64 + 4 {
253
+ } else if self . data . len ( ) as u64 <= u32:: MAX as u64 + 4 {
254
254
let bytes = 4 ;
255
255
let max_size = self . data . len ( ) - bytes;
256
256
let ( rest, for_size) = self . data . split_at ( max_size) ;
You can’t perform that action at this time.
0 commit comments