From 946061864dac917d77035f6ebddc6612867eacdf Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Mon, 30 Dec 2024 00:30:29 +0100 Subject: [PATCH] fix(style): use `usize::midpoint` when appropriate --- src/matrix.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix.rs b/src/matrix.rs index 072022a8..d917cb05 100644 --- a/src/matrix.rs +++ b/src/matrix.rs @@ -482,7 +482,7 @@ impl Matrix { 2 => self.data.reverse(), n => { for r in 0..self.rows / 2 { - for c in 0..(self.columns + 1) / 2 { + for c in 0..usize::midpoint(1, self.columns) { // i1 … i2 // … … … // i4 … i3