diff --git a/src/uu/whoami/src/platform/windows.rs b/src/uu/whoami/src/platform/windows.rs index 8afa18b63..a627bed8e 100644 --- a/src/uu/whoami/src/platform/windows.rs +++ b/src/uu/whoami/src/platform/windows.rs @@ -20,10 +20,8 @@ pub fn get_username() -> io::Result { let mut buffer = [0_u16; BUF_LEN as usize]; let mut len = BUF_LEN; // SAFETY: buffer.len() == len - unsafe { - if winbase::GetUserNameW(buffer.as_mut_ptr(), &mut len) == 0 { - return Err(io::Error::last_os_error()); - } + if unsafe { winbase::GetUserNameW(buffer.as_mut_ptr(), &mut len) } == 0 { + return Err(io::Error::last_os_error()); } Ok(OsString::from_wide(&buffer[..len as usize - 1])) }