about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2025-06-26 20:56:20 +0200
committerPhilipp Krones <hello@philkrones.com>2025-06-27 12:21:45 +0200
commit4b3f31df4fd6bcca2c212a75494bb77e81d6f49f (patch)
tree779f7d6946dd652bfc4b132f2541dab081feceab /src/bootstrap
parentf13d785a264cbe3cbba759ed8e9d581db362603e (diff)
downloadrust-4b3f31df4fd6bcca2c212a75494bb77e81d6f49f.tar.gz
rust-4b3f31df4fd6bcca2c212a75494bb77e81d6f49f.zip
Use `.is_multiple_of()` in bootstrap
This makes the intent clear, and silences Clippy.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/utils/render_tests.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bootstrap/src/utils/render_tests.rs b/src/bootstrap/src/utils/render_tests.rs
index 77e645a9e3c..051d7dd9fd4 100644
--- a/src/bootstrap/src/utils/render_tests.rs
+++ b/src/bootstrap/src/utils/render_tests.rs
@@ -202,7 +202,9 @@ impl<'a> Renderer<'a> {
     }
 
     fn render_test_outcome_terse(&mut self, outcome: Outcome<'_>, test: &TestOutcome) {
-        if self.terse_tests_in_line != 0 && self.terse_tests_in_line % TERSE_TESTS_PER_LINE == 0 {
+        if self.terse_tests_in_line != 0
+            && self.terse_tests_in_line.is_multiple_of(TERSE_TESTS_PER_LINE)
+        {
             if let Some(total) = self.tests_count {
                 let total = total.to_string();
                 let executed = format!("{:>width$}", self.executed_tests - 1, width = total.len());