Skip to content

Commit

Permalink
Update library/std/src/sys/unix/time.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
  • Loading branch information
Stargateur and m-ou-se committed Mar 3, 2024
1 parent 1eb1559 commit 270b999
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/sys/unix/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl Timespec {
if tv_nsec >= 0 && tv_nsec < NSEC_PER_SEC as i64 {
Ok(unsafe { Self::new_unchecked(tv_sec, tv_nsec) })
} else {
Err(io::const_io_error!(io::ErrorKind::Other, "Invalid time for nanosecond"))
Err(io::const_io_error!(io::ErrorKind::InvalidData, "Invalid timestamp"))
}
}

Expand Down

0 comments on commit 270b999

Please sign in to comment.