Skip to content

Commit fc3993d

Browse files
giorgidzemeta-codesync[bot]
authored andcommitted
Lint clean traversal.rs
Summary: Summary ================================ ### Changes in `traversal.rs` file The diff makes a change in the `traversal.rs` file in the `edenfs-commands` directory. The change replaces the manual modulo operation with the `is_multiple_of` method. Reviewed By: akushner Differential Revision: D83885957 fbshipit-source-id: d75749260c9f44cb54ac5cf7538fa81d38f0a335
1 parent d8299bf commit fc3993d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

eden/fs/cli_rs/edenfs-commands/src/debug/bench/traversal.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,14 @@ impl InProgressTraversal {
9999
fn add_file(&mut self, path: PathBuf) {
100100
self.file_count += 1;
101101
self.file_paths.push(path);
102-
if (self.file_count + self.dir_count) % 1000 == 0 {
102+
if (self.file_count + self.dir_count).is_multiple_of(1000) {
103103
self.update_progress();
104104
}
105105
}
106106

107107
fn add_dir(&mut self) {
108108
self.dir_count += 1;
109-
if (self.file_count + self.dir_count) % 1000 == 0 {
109+
if (self.file_count + self.dir_count).is_multiple_of(1000) {
110110
self.update_progress();
111111
}
112112
}

0 commit comments

Comments
 (0)