We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9e5a75 commit e9ee2cbCopy full SHA for e9ee2cb
src/libcore/tests/time.rs
@@ -2,7 +2,7 @@ use core::time::Duration;
2
3
#[test]
4
fn creation() {
5
- assert!(Duration::from_secs(1) != Duration::from_secs(0));
+ assert_ne!(Duration::from_secs(1), Duration::from_secs(0));
6
assert_eq!(Duration::from_secs(1) + Duration::from_secs(2),
7
Duration::from_secs(3));
8
assert_eq!(Duration::from_millis(10) + Duration::from_secs(4),
@@ -107,14 +107,12 @@ fn checked_sub() {
107
108
109
#[should_panic]
110
-#[cfg(not(miri))] // Miri does not support panics
111
fn sub_bad1() {
112
let _ = Duration::new(0, 0) - Duration::new(0, 1);
113
}
114
115
116
117
118
fn sub_bad2() {
119
let _ = Duration::new(0, 0) - Duration::new(1, 0);
120
0 commit comments