From c680a87b0155c4dcac5c4f637b540cc4a8976d29 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 7 Nov 2022 21:40:20 -0500 Subject: [PATCH] chore: fix windows-only clippy error (#16560) --- runtime/ops/os/sys_info.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/ops/os/sys_info.rs b/runtime/ops/os/sys_info.rs index f4bc6a9c6c..40de7cc4b0 100644 --- a/runtime/ops/os/sys_info.rs +++ b/runtime/ops/os/sys_info.rs @@ -146,6 +146,7 @@ pub fn hostname() -> String { let mut name: Vec = vec![0u16; namelen]; // Start winsock to make `GetHostNameW` work correctly // https://github.com/retep998/winapi-rs/issues/296 + // SAFETY: winapi call WINSOCKET_INIT.call_once(|| unsafe { let mut data = mem::zeroed(); let wsa_startup_result = WSAStartup(MAKEWORD(2, 2), &mut data);