Remove unnecessary cfgs in bucket map (#20068)

This commit is contained in:
Brooks Prumo 2021-09-21 14:45:34 -05:00 committed by GitHub
parent 8dbed193c2
commit 0b6e9d861e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -213,6 +213,7 @@ impl BucketStorage {
} }
} }
#[allow(clippy::mut_from_ref)]
pub fn get_mut<T: Sized>(&self, ix: u64) -> &mut T { pub fn get_mut<T: Sized>(&self, ix: u64) -> &mut T {
if ix >= self.num_cells() { if ix >= self.num_cells() {
panic!("bad index size"); panic!("bad index size");
@ -226,6 +227,7 @@ impl BucketStorage {
} }
} }
#[allow(clippy::mut_from_ref)]
pub fn get_mut_cell_slice<T: Sized>(&self, ix: u64, len: u64) -> &mut [T] { pub fn get_mut_cell_slice<T: Sized>(&self, ix: u64, len: u64) -> &mut [T] {
if ix >= self.num_cells() { if ix >= self.num_cells() {
panic!("bad index size"); panic!("bad index size");

View File

@ -1,6 +1,4 @@
#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
#![allow(clippy::integer_arithmetic)] #![allow(clippy::integer_arithmetic)]
#![allow(clippy::mut_from_ref)]
mod bucket; mod bucket;
mod bucket_item; mod bucket_item;
pub mod bucket_map; pub mod bucket_map;