mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-20 06:21:13 +01:00
refactor: satisfy clippy::manual_bits
This commit is contained in:
1 parent
c72bc7b84b
commit
b1eb6db8cd
2 files changed
+2
-3
No files matched your search
+1
-1
@@ -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();
|
||||
|
||||
|
||||
Reference in new issue
Block a user