Skip to content
Prev Previous commit
Next Next commit
opt-dist: apply considerable clippy suggestions
Signed-off-by: onur-ozkan <[email protected]>
  • Loading branch information
onur-ozkan committed Jun 13, 2024
commit a31b1b2eeb99192272c7f27bea7dc336a54e2546
8 changes: 3 additions & 5 deletions src/tools/opt-dist/src/training.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,9 @@ pub fn gather_bolt_profiles(
log::info!("Profile file count: {}", profiles.len());

// Delete the gathered profiles
for profile in glob::glob(&format!("{profile_prefix}*"))?.into_iter() {
if let Ok(profile) = profile {
if let Err(error) = std::fs::remove_file(&profile) {
log::error!("Cannot delete BOLT profile {}: {error:?}", profile.display());
}
for profile in glob::glob(&format!("{profile_prefix}*"))?.flatten() {
if let Err(error) = std::fs::remove_file(&profile) {
log::error!("Cannot delete BOLT profile {}: {error:?}", profile.display());
}
}

Expand Down