Skip to content

Commit 42b6696

Browse files
RalfJungcarllerche
authored andcommitted
use raw ptr for potentially racy load (#240)
1 parent 9504447 commit 42b6696

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bytes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2467,7 +2467,7 @@ impl Inner {
24672467
// function.
24682468
let prev = unsafe {
24692469
let p: &AtomicPtr<Shared> = &self.arc;
2470-
let p: &usize = mem::transmute(p);
2470+
let p: *const usize = mem::transmute(p);
24712471
*p
24722472
};
24732473

0 commit comments

Comments
 (0)