mirror of
https://github.com/rust-lang/rust
synced 2024-09-21 09:22:41 +00:00
opt-dist: apply considerable clippy suggestions
Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
parent
80d96dffae
commit
a31b1b2eeb
|
@ -216,13 +216,11 @@ 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 {
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ok(BoltProfile(merged_profile))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue