Skip to content

Commit 0ce3755

Browse files
committed
vmstat: use is_multiple_of instead of manual impl
to fix warning from manual_is_multiple_of lint
1 parent 17b86e5 commit 0ce3755

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/uu/vmstat/src/vmstat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ fn print_slabs(one_header: bool, term_height: u16) -> UResult<()> {
139139

140140
#[cfg(target_os = "linux")]
141141
fn needs_header(one_header: bool, term_height: u16, line_count: u64) -> bool {
142-
!one_header && term_height > 0 && ((line_count + 3) % term_height as u64 == 0)
142+
!one_header && term_height > 0 && (line_count + 3).is_multiple_of(term_height as u64)
143143
}
144144

145145
#[cfg(target_os = "linux")]

0 commit comments

Comments
 (0)