Skip to content

Commit a31b1b2

Browse files
committed
opt-dist: apply considerable clippy suggestions
Signed-off-by: onur-ozkan <[email protected]>
1 parent 80d96df commit a31b1b2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Diff for: src/tools/opt-dist/src/training.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,9 @@ pub fn gather_bolt_profiles(
216216
log::info!("Profile file count: {}", profiles.len());
217217

218218
// Delete the gathered profiles
219-
for profile in glob::glob(&format!("{profile_prefix}*"))?.into_iter() {
220-
if let Ok(profile) = profile {
221-
if let Err(error) = std::fs::remove_file(&profile) {
222-
log::error!("Cannot delete BOLT profile {}: {error:?}", profile.display());
223-
}
219+
for profile in glob::glob(&format!("{profile_prefix}*"))?.flatten() {
220+
if let Err(error) = std::fs::remove_file(&profile) {
221+
log::error!("Cannot delete BOLT profile {}: {error:?}", profile.display());
224222
}
225223
}
226224

0 commit comments

Comments
 (0)