Skip to content

Commit 0e0a7e7

Browse files
committed
Run cargo bless
1 parent 703d7d8 commit 0e0a7e7

1 file changed

Lines changed: 38 additions & 14 deletions

File tree

tests/ui/duration_suboptimal_units.stderr

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: constructing a `Duration` using a smaller unit when a larger unit would be more readable
2-
--> tests/ui/duration_suboptimal_units.rs:27:15
2+
--> tests/ui/duration_suboptimal_units.rs:26:15
33
|
44
LL | let dur = Duration::from_secs(59 + 1);
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -13,7 +13,31 @@ LL + let dur = Duration::from_mins(1);
1313
|
1414

1515
error: constructing a `Duration` using a smaller unit when a larger unit would be more readable
16-
--> tests/ui/duration_suboptimal_units.rs:30:15
16+
--> tests/ui/duration_suboptimal_units.rs:38:15
17+
|
18+
LL | let dur = Duration::from_millis(20_000);
19+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20+
|
21+
help: try using from_secs
22+
|
23+
LL - let dur = Duration::from_millis(20_000);
24+
LL + let dur = Duration::from_secs(20);
25+
|
26+
27+
error: constructing a `Duration` using a smaller unit when a larger unit would be more readable
28+
--> tests/ui/duration_suboptimal_units.rs:40:15
29+
|
30+
LL | let dur = Duration::from_mins(720);
31+
| ^^^^^^^^^^^^^^^^^^^^^^^^
32+
|
33+
help: try using from_hours
34+
|
35+
LL - let dur = Duration::from_mins(720);
36+
LL + let dur = Duration::from_hours(12);
37+
|
38+
39+
error: constructing a `Duration` using a smaller unit when a larger unit would be more readable
40+
--> tests/ui/duration_suboptimal_units.rs:43:15
1741
|
1842
LL | let dur = Duration::from_secs(60 * 3);
1943
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -25,7 +49,7 @@ LL + let dur = Duration::from_mins(3);
2549
|
2650

2751
error: constructing a `Duration` using a smaller unit when a larger unit would be more readable
28-
--> tests/ui/duration_suboptimal_units.rs:32:15
52+
--> tests/ui/duration_suboptimal_units.rs:45:15
2953
|
3054
LL | let dur = Duration::from_secs(10 * 60);
3155
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -37,7 +61,7 @@ LL + let dur = Duration::from_mins(10);
3761
|
3862

3963
error: constructing a `Duration` using a smaller unit when a larger unit would be more readable
40-
--> tests/ui/duration_suboptimal_units.rs:34:15
64+
--> tests/ui/duration_suboptimal_units.rs:47:15
4165
|
4266
LL | let dur = Duration::from_mins(24 * 60);
4367
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -49,7 +73,7 @@ LL + let dur = Duration::from_hours(24);
4973
|
5074

5175
error: constructing a `Duration` using a smaller unit when a larger unit would be more readable
52-
--> tests/ui/duration_suboptimal_units.rs:37:15
76+
--> tests/ui/duration_suboptimal_units.rs:49:15
5377
|
5478
LL | let dur = Duration::from_millis(5 * 1000);
5579
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -61,7 +85,7 @@ LL + let dur = Duration::from_secs(5);
6185
|
6286

6387
error: constructing a `Duration` using a smaller unit when a larger unit would be more readable
64-
--> tests/ui/duration_suboptimal_units.rs:39:15
88+
--> tests/ui/duration_suboptimal_units.rs:51:15
6589
|
6690
LL | let dur = Duration::from_nanos(13 * 60 * 60 * 1_000 * 1_000 * 1_000);
6791
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -73,7 +97,7 @@ LL + let dur = Duration::from_hours(13);
7397
|
7498

7599
error: constructing a `Duration` using a smaller unit when a larger unit would be more readable
76-
--> tests/ui/duration_suboptimal_units.rs:51:19
100+
--> tests/ui/duration_suboptimal_units.rs:63:19
77101
|
78102
LL | let dur = Duration::from_millis(1000 * 5);
79103
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -85,7 +109,7 @@ LL + let dur = Duration::from_secs(5);
85109
|
86110

87111
error: constructing a `Duration` using a smaller unit when a larger unit would be more readable
88-
--> tests/ui/duration_suboptimal_units.rs:53:19
112+
--> tests/ui/duration_suboptimal_units.rs:65:19
89113
|
90114
LL | let dur = Duration::from_millis(11000);
91115
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -97,7 +121,7 @@ LL + let dur = Duration::from_secs(11);
97121
|
98122

99123
error: constructing a `Duration` using a smaller unit when a larger unit would be more readable
100-
--> tests/ui/duration_suboptimal_units.rs:58:19
124+
--> tests/ui/duration_suboptimal_units.rs:70:19
101125
|
102126
LL | let dur = Duration::from_secs(39600);
103127
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -109,7 +133,7 @@ LL + let dur = Duration::from_hours(11);
109133
|
110134

111135
error: constructing a `Duration` using a smaller unit when a larger unit would be more readable
112-
--> tests/ui/duration_suboptimal_units.rs:60:19
136+
--> tests/ui/duration_suboptimal_units.rs:72:19
113137
|
114138
LL | let dur = Duration::from_secs(3 * 60);
115139
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -121,7 +145,7 @@ LL + let dur = Duration::from_mins(3);
121145
|
122146

123147
error: constructing a `Duration` using a smaller unit when a larger unit would be more readable
124-
--> tests/ui/duration_suboptimal_units.rs:62:19
148+
--> tests/ui/duration_suboptimal_units.rs:74:19
125149
|
126150
LL | let dur = Duration::from_mins(24 * 60);
127151
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -133,7 +157,7 @@ LL + let dur = Duration::from_hours(24);
133157
|
134158

135159
error: constructing a `Duration` using a smaller unit when a larger unit would be more readable
136-
--> tests/ui/duration_suboptimal_units.rs:70:16
160+
--> tests/ui/duration_suboptimal_units.rs:82:16
137161
|
138162
LL | assert_eq!(Duration::from_secs(60 * 60), Duration::from_mins(6));
139163
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -161,7 +185,7 @@ LL + Duration::from_mins(5)
161185
|
162186

163187
error: constructing a `Duration` using a smaller unit when a larger unit would be more readable
164-
--> tests/ui/duration_suboptimal_units.rs:105:9
188+
--> tests/ui/duration_suboptimal_units.rs:125:9
165189
|
166190
LL | _ = Duration::from_secs(67_768_040_922_076_800);
167191
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -172,5 +196,5 @@ LL - _ = Duration::from_secs(67_768_040_922_076_800);
172196
LL + _ = Duration::from_hours(18824455811688);
173197
|
174198

175-
error: aborting due to 13 previous errors
199+
error: aborting due to 16 previous errors
176200

0 commit comments

Comments
 (0)