0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-01 12:16:11 -05:00

chore: fix windows-only clippy error (#16560)

This commit is contained in:
David Sherret 2022-11-07 21:40:20 -05:00 committed by Bartek Iwańczuk
parent 3ba83cc214
commit c680a87b01
No known key found for this signature in database
GPG key ID: 0C6BCDDC3B3AD750

View file

@ -146,6 +146,7 @@ pub fn hostname() -> String {
let mut name: Vec<u16> = 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);