Dyn erase at call site

This commit is contained in:
David Thomas
2024-02-17 13:36:00 +00:00
committed by GnomedDev
parent 0433439433
commit dbb15fb45d
10 changed files with 53 additions and 62 deletions

View File

@@ -199,7 +199,7 @@ impl<'a> TryFrom<(&'a str, u16)> for LookupHost {
fn try_from((host, port): (&'a str, u16)) -> io::Result<LookupHost> {
init();
run_with_cstr(host.as_bytes(), |c_host| {
run_with_cstr(host.as_bytes(), &|c_host| {
let mut hints: c::addrinfo = unsafe { mem::zeroed() };
hints.ai_socktype = c::SOCK_STREAM;
let mut res = ptr::null_mut();