We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 80d96df commit a31b1b2Copy full SHA for a31b1b2
src/tools/opt-dist/src/training.rs
@@ -216,11 +216,9 @@ pub fn gather_bolt_profiles(
216
log::info!("Profile file count: {}", profiles.len());
217
218
// 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
- }
+ 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());
224
}
225
226
0 commit comments