mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
refactor: satisfy clippy::manual_bits
This commit is contained in:
parent
c72bc7b84b
commit
b1eb6db8cd
@ -11,7 +11,7 @@ type IdType = u64;
|
||||
type ZippedIndex = Index;
|
||||
type NonZeroId = std::num::NonZeroU64;
|
||||
|
||||
const INDEX_BITS: usize = std::mem::size_of::<ZippedIndex>() * 8;
|
||||
const INDEX_BITS: usize = ZippedIndex::BITS as usize;
|
||||
const EPOCH_BITS: usize = INDEX_BITS - BACKEND_BITS;
|
||||
const BACKEND_BITS: usize = 3;
|
||||
const BACKEND_SHIFT: usize = INDEX_BITS * 2 - BACKEND_BITS;
|
||||
|
@ -1,7 +1,6 @@
|
||||
//! The `ResourceMetadata` type.
|
||||
|
||||
use bit_vec::BitVec;
|
||||
use std::mem;
|
||||
use wgt::strict_assert;
|
||||
|
||||
/// A set of resources, holding a `Arc<T>` and epoch for each member.
|
||||
@ -191,7 +190,7 @@ fn resize_bitvec<B: bit_vec::BitBlock>(vec: &mut BitVec<B>, size: usize) {
|
||||
///
|
||||
/// Will skip entire usize's worth of bits if they are all false.
|
||||
fn iterate_bitvec_indices(ownership: &BitVec<usize>) -> impl Iterator<Item = usize> + '_ {
|
||||
const BITS_PER_BLOCK: usize = mem::size_of::<usize>() * 8;
|
||||
const BITS_PER_BLOCK: usize = usize::BITS as usize;
|
||||
|
||||
let size = ownership.len();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user