Skip to content

Commit aaef322

Browse files
committed
Fix clippy::ptr_as_ptr (pedantic)
https://rust-lang.github.io/rust-clippy/master/index.html#ptr_as_ptr Signed-off-by: Anders Kaseorg <andersk@mit.edu>
1 parent 5c97130 commit aaef322

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

gc/src/gc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ impl<
160160

161161
// Create a pointer with the metadata of value and the
162162
// address and provenance of the GcBox.
163-
let gcbox = set_data_ptr(value as *mut GcBox<T>, gcbox_addr);
163+
let gcbox = set_data_ptr(value.cast::<GcBox<T>>(), gcbox_addr);
164164

165165
// Move the data.
166166
ptr::addr_of_mut!((*gcbox).header).write(GcBoxHeader::new());

0 commit comments

Comments
 (0)