Update src/send-and-sync.md

Co-authored-by: Daniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>
pull/259/head
Daniel Franklin 4 years ago committed by GitHub
parent d060a51864
commit 09d4be20f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -93,7 +93,7 @@ struct Carton<T>(ptr::NonNull<T>);
impl<T> Carton<T> {
pub fn new(value: T) -> Self {
// Allocate enough memory on the heap to store one T.
assert_ne!(size_of::<T>(), 0, "Zero-sized types are out of the scope of this example);
assert_ne!(size_of::<T>(), 0, "Zero-sized types are out of the scope of this example");
let memptr: *mut c_void = ptr::null_mut();
unsafe {
let ret = libc::posix_memalign(

Loading…
Cancel
Save