1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

Move code around

This commit is contained in:
Eelco Dolstra 2019-09-11 13:10:46 +02:00
parent d14b1c261c
commit d33dd6e6c0
7 changed files with 22 additions and 6 deletions

View file

@ -14,7 +14,6 @@ impl<T> CBox<T> {
unsafe {
let size = std::mem::size_of::<T>();
let ptr = libc::malloc(size);
eprintln!("PTR = {:?}, SIZE = {}", ptr, size);
*(ptr as *mut T) = t; // FIXME: probably UB
Self {
ptr,