mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Rollup merge of #154518 - stepancheg:hermit-panic, r=Mark-Simulacrum
Panic in Hermit clock_gettime Follow-up to rust-lang/rust#154234. r? @Mark-Simulacrum
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
fn clock_gettime(clock: hermit_abi::clockid_t) -> Timespec {
|
||||
let mut t = hermit_abi::timespec { tv_sec: 0, tv_nsec: 0 };
|
||||
let _ = unsafe { hermit_abi::clock_gettime(clock, &raw mut t) };
|
||||
unsafe { hermit_abi::clock_gettime(clock, &raw mut t) }.unwrap();
|
||||
Timespec::new(t.tv_sec, t.tv_nsec.into()).unwrap()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user