diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-07-15 12:30:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-15 12:30:25 -0400 |
commit | 635eed93731c3616cacf53860b9aeeeb8cfe158b (patch) | |
tree | 04509d5720189fe12b2021500c461ccea1ddfa8e /cli | |
parent | ee0c0586b318fe23908a3b9b4311b26d79c5c8a1 (diff) |
chore: fix Windows specific clippy errors (#15212)
Diffstat (limited to 'cli')
-rw-r--r-- | cli/deno_dir.rs | 1 | ||||
-rw-r--r-- | cli/lsp/parent_process_checker.rs | 1 | ||||
-rw-r--r-- | cli/windows_util.rs | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/cli/deno_dir.rs b/cli/deno_dir.rs index 0a1864f2c..8ca705691 100644 --- a/cli/deno_dir.rs +++ b/cli/deno_dir.rs @@ -133,6 +133,7 @@ mod dirs { use winapi::um::{combaseapi, knownfolders, shlobj, shtypes, winbase, winnt}; fn known_folder(folder_id: shtypes::REFKNOWNFOLDERID) -> Option<PathBuf> { + // SAFETY: winapi calls unsafe { let mut path_ptr: winnt::PWSTR = std::ptr::null_mut(); let result = shlobj::SHGetKnownFolderPath( diff --git a/cli/lsp/parent_process_checker.rs b/cli/lsp/parent_process_checker.rs index e4a359bd9..5983d914a 100644 --- a/cli/lsp/parent_process_checker.rs +++ b/cli/lsp/parent_process_checker.rs @@ -39,6 +39,7 @@ fn is_process_active(process_id: u32) -> bool { use winapi::um::synchapi::WaitForSingleObject; use winapi::um::winnt::SYNCHRONIZE; + // SAFETY: winapi calls unsafe { let process = OpenProcess(SYNCHRONIZE, FALSE, process_id as DWORD); let result = if process == NULL { diff --git a/cli/windows_util.rs b/cli/windows_util.rs index deab9f38a..0801ff2f5 100644 --- a/cli/windows_util.rs +++ b/cli/windows_util.rs @@ -5,6 +5,7 @@ /// constructed from a stdio handle; if the handle is null this causes a panic. pub fn ensure_stdio_open() { #[cfg(windows)] + // SAFETY: winapi calls unsafe { use std::mem::size_of; use winapi::shared::minwindef::DWORD; |