Fix lints for Rust 1.86

This commit is contained in:
Héctor Ramón Jiménez 2025-04-03 16:59:55 +02:00
parent 1b22d7d5fc
commit 53ce0e3a88
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
6 changed files with 21 additions and 19 deletions

View file

@ -4,9 +4,8 @@ use std::ops::RangeBounds;
pub const MAX_WRITE_SIZE: usize = 100 * 1024;
#[allow(unsafe_code)]
const MAX_WRITE_SIZE_U64: NonZeroU64 =
unsafe { NonZeroU64::new_unchecked(MAX_WRITE_SIZE as u64) };
const MAX_WRITE_SIZE_U64: NonZeroU64 = NonZeroU64::new(MAX_WRITE_SIZE as u64)
.expect("MAX_WRITE_SIZE must be non-zero");
#[derive(Debug)]
pub struct Buffer<T> {