rust-clippy/tests/ui/duration_subsec.stderr

35 lines
1.4 KiB
Text
Raw Normal View History

error: Calling `subsec_millis()` is more concise than this calculation
2018-12-10 05:27:19 +00:00
--> $DIR/duration_subsec.rs:17:24
|
2018-12-27 15:57:55 +00:00
LL | let bad_millis_1 = dur.subsec_micros() / 1_000;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `dur.subsec_millis()`
|
= note: `-D clippy::duration-subsec` implied by `-D warnings`
2018-03-18 20:27:15 +00:00
error: Calling `subsec_millis()` is more concise than this calculation
2018-12-10 05:27:19 +00:00
--> $DIR/duration_subsec.rs:18:24
|
2018-12-27 15:57:55 +00:00
LL | let bad_millis_2 = dur.subsec_nanos() / 1_000_000;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `dur.subsec_millis()`
error: Calling `subsec_micros()` is more concise than this calculation
2018-12-10 05:27:19 +00:00
--> $DIR/duration_subsec.rs:23:22
2018-03-18 20:27:15 +00:00
|
2018-12-27 15:57:55 +00:00
LL | let bad_micros = dur.subsec_nanos() / 1_000;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `dur.subsec_micros()`
2018-03-18 20:27:15 +00:00
error: Calling `subsec_micros()` is more concise than this calculation
2018-12-10 05:27:19 +00:00
--> $DIR/duration_subsec.rs:28:13
2018-03-18 20:27:15 +00:00
|
2018-12-27 15:57:55 +00:00
LL | let _ = (&dur).subsec_nanos() / 1_000;
2018-03-18 20:27:15 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&dur).subsec_micros()`
error: Calling `subsec_micros()` is more concise than this calculation
2018-12-10 05:27:19 +00:00
--> $DIR/duration_subsec.rs:32:13
2018-03-18 20:27:15 +00:00
|
2018-12-27 15:57:55 +00:00
LL | let _ = dur.subsec_nanos() / NANOS_IN_MICRO;
2018-03-18 20:27:15 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `dur.subsec_micros()`
error: aborting due to 5 previous errors
2018-03-18 20:27:15 +00:00