mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
to_timespec could be unused by some targets
This commit is contained in:
parent
3cadc11d83
commit
42f8e1f879
@ -125,6 +125,7 @@ impl Timespec {
|
||||
Some(Timespec::new(secs, nsec as i64))
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn to_timespec(&self) -> Option<libc::timespec> {
|
||||
Some(libc::timespec {
|
||||
tv_sec: self.tv_sec.try_into().ok()?,
|
||||
|
Loading…
Reference in New Issue
Block a user