mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-08 13:48:26 +00:00
Remove all uses of mem::uninitialized for Rust 1.38
This commit is contained in:
21
lib/emscripten/src/env/unix/mod.rs
vendored
21
lib/emscripten/src/env/unix/mod.rs
vendored
@@ -196,18 +196,15 @@ pub fn _getaddrinfo(
|
||||
|
||||
let hints = hints_ptr.deref(memory).map(|hints_memory| {
|
||||
let hints_guest = hints_memory.get();
|
||||
unsafe {
|
||||
let mut hints_native: addrinfo = std::mem::uninitialized();
|
||||
hints_native.ai_flags = hints_guest.ai_flags;
|
||||
hints_native.ai_family = hints_guest.ai_family;
|
||||
hints_native.ai_socktype = hints_guest.ai_socktype;
|
||||
hints_native.ai_protocol = hints_guest.ai_protocol;
|
||||
hints_native.ai_addrlen = 0;
|
||||
hints_native.ai_addr = std::ptr::null_mut();
|
||||
hints_native.ai_canonname = std::ptr::null_mut();
|
||||
hints_native.ai_next = std::ptr::null_mut();
|
||||
|
||||
hints_native
|
||||
addrinfo {
|
||||
ai_flags: hints_guest.ai_flags,
|
||||
ai_family: hints_guest.ai_family,
|
||||
ai_socktype: hints_guest.ai_socktype,
|
||||
ai_protocol: hints_guest.ai_protocol,
|
||||
ai_addrlen: 0,
|
||||
ai_addr: std::ptr::null_mut(),
|
||||
ai_canonname: std::ptr::null_mut(),
|
||||
ai_next: std::ptr::null_mut(),
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user