Skip to content

Commit 749b2f4

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

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/tools/opt-dist/src/training.rs

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

238238
// Delete the gathered profiles
239-
for profile in glob::glob(&format!("{profile_prefix}*"))?.into_iter() {
240-
if let Ok(profile) = profile {
241-
if let Err(error) = std::fs::remove_file(&profile) {
242-
log::error!("Cannot delete BOLT profile {}: {error:?}", profile.display());
243-
}
239+
for profile in glob::glob(&format!("{profile_prefix}*"))?.flatten() {
240+
if let Err(error) = std::fs::remove_file(&profile) {
241+
log::error!("Cannot delete BOLT profile {}: {error:?}", profile.display());
244242
}
245243
}
246244

0 commit comments

Comments
 (0)