Skip to content

Commit 4b3f31d

Browse files
samueltardieuflip1995
authored andcommitted
Use .is_multiple_of() in bootstrap
This makes the intent clear, and silences Clippy.
1 parent f13d785 commit 4b3f31d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/bootstrap/src/utils/render_tests.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,9 @@ impl<'a> Renderer<'a> {
202202
}
203203

204204
fn render_test_outcome_terse(&mut self, outcome: Outcome<'_>, test: &TestOutcome) {
205-
if self.terse_tests_in_line != 0 && self.terse_tests_in_line % TERSE_TESTS_PER_LINE == 0 {
205+
if self.terse_tests_in_line != 0
206+
&& self.terse_tests_in_line.is_multiple_of(TERSE_TESTS_PER_LINE)
207+
{
206208
if let Some(total) = self.tests_count {
207209
let total = total.to_string();
208210
let executed = format!("{:>width$}", self.executed_tests - 1, width = total.len());

0 commit comments

Comments
 (0)