Use .is_multiple_of() in bootstrap

This makes the intent clear, and silences Clippy.
This commit is contained in:
Samuel Tardieu 2025-06-26 20:56:20 +02:00 committed by Philipp Krones
parent f13d785a26
commit 4b3f31df4f
No known key found for this signature in database
GPG key ID: 1CA0DF2AF59D68A5

View file

@ -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());