Skip to content

Commit

Permalink
Replace mem::uninitialized with mem::zeroed
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeSandwich committed Jul 23, 2019
1 parent eb0fdad commit 4fddb71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion macros/src/header_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ fn write_extract_args<T>(f: &mut Formatter, fn_args: &Punctuated<FnArg, T>) -> R
}
write!(f, "unsafe {{ (")?;
for fn_arg_name in iter_fn_arg_names(fn_args) {
write!(f, "{}::mem::replace(&mut *(&{} as *const _ as *mut _), {}::mem::uninitialized()), ",
write!(f, "{}::mem::replace(&mut *(&{} as *const _ as *mut _), {}::mem::zeroed()), ",
STD_CRATE_NAME, fn_arg_name, STD_CRATE_NAME)?;
}
write!(f, ") }}")
Expand Down

0 comments on commit 4fddb71

Please sign in to comment.