mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-10-30 08:40:18 +00:00
Update dependencies
This commit is contained in:
1 parent
83f04cdd31
commit
2efc633486
5 files changed
+268
-328
No files matched your search
+3
-3
@@ -11,7 +11,7 @@ use nix::fcntl::{splice, SpliceFFlags};
|
||||
#[cfg(target_os = "linux")]
|
||||
use std::fs::File;
|
||||
#[cfg(target_os = "linux")]
|
||||
use std::os::unix::io::AsRawFd;
|
||||
use std::os::fd::AsFd;
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
use windows_sys::Win32::System::Threading::CREATE_SUSPENDED;
|
||||
@@ -53,9 +53,9 @@ fn discard(output: ChildStdout) {
|
||||
{
|
||||
if let Ok(file) = File::create("/dev/null") {
|
||||
while let Ok(bytes) = splice(
|
||||
output.as_raw_fd(),
|
||||
output.as_fd(),
|
||||
None,
|
||||
file.as_raw_fd(),
|
||||
file.as_fd(),
|
||||
None,
|
||||
CHUNK_SIZE,
|
||||
SpliceFFlags::empty(),
|
||||
|
||||
@@ -37,7 +37,7 @@ static NtResumeProcess: Lazy<unsafe extern "system" fn(ProcessHandle: HANDLE) ->
|
||||
Lazy::new(|| {
|
||||
// SAFETY: Getting the module handle for ntdll.dll is safe
|
||||
let ntdll = unsafe { GetModuleHandleW(w!("ntdll.dll")) };
|
||||
assert!(ntdll != 0, "GetModuleHandleW failed");
|
||||
assert!(ntdll != std::ptr::null_mut(), "GetModuleHandleW failed");
|
||||
|
||||
// SAFETY: The ntdll handle is valid
|
||||
let nt_resume_process = unsafe { GetProcAddress(ntdll, s!("NtResumeProcess")) };
|
||||
@@ -56,7 +56,10 @@ impl CPUTimer {
|
||||
|
||||
// SAFETY: Creating a new job object is safe
|
||||
let job_object = unsafe { CreateJobObjectW(ptr::null_mut(), ptr::null_mut()) };
|
||||
assert!(job_object != 0, "CreateJobObjectW failed");
|
||||
assert!(
|
||||
job_object != std::ptr::null_mut(),
|
||||
"CreateJobObjectW failed"
|
||||
);
|
||||
|
||||
// SAFETY: The job object handle is valid
|
||||
let ret = unsafe { AssignProcessToJobObject(job_object, child_handle) };
|
||||
|
||||
Reference in new issue
Block a user