Skip to content

Commit

Permalink
once more
Browse files Browse the repository at this point in the history
  • Loading branch information
Arlie Davis committed Jun 6, 2024
1 parent 0940e1f commit 855acb4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ rust_2018_idioms = { level = "warn", priority = -1 }
unused_qualifications = "warn"
missing_docs = "warn"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(windows_raw_dylib, windows_debugger_visualizer)'] }

# See https://github.com/microsoft/windows-rs/issues/3076
unused-qualifications = { level = "allow" }
3 changes: 1 addition & 2 deletions crates/libs/core/src/imp/weak_ref_count.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ impl WeakRefCount {

let tear_off = TearOff::new(object, count_or_pointer as u32);
let tear_off_ptr: *mut c_void = transmute_copy(&tear_off);
let encoding: usize =
((tear_off_ptr as usize) >> 1) | (1 << (core::mem::size_of::<usize>() * 8 - 1));
let encoding: usize = ((tear_off_ptr as usize) >> 1) | (1 << (usize::BITS - 1));

loop {
match self.0.compare_exchange_weak(
Expand Down

0 comments on commit 855acb4

Please sign in to comment.