We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 077d6d2 commit 404aa68Copy full SHA for 404aa68
test/sys/test_time.rs
@@ -15,12 +15,12 @@ pub fn test_timespec() {
15
}
16
17
#[test]
18
-pub fn test_timespec_from() {
+pub fn test_timespec_try_from() {
19
let duration = Duration::new(123, 123_456_789);
20
let timespec = TimeSpec::nanoseconds(123_123_456_789);
21
22
- assert_eq!(TimeSpec::from(duration), timespec);
23
- assert_eq!(Duration::from(timespec), duration);
+ assert_eq!(TimeSpec::try_from(duration).unwrap(), timespec);
+ assert_eq!(Duration::try_from(timespec).unwrap(), duration);
24
25
26
0 commit comments