Skip to content

Commit

Permalink
apply clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pgarg66 committed May 10, 2023
1 parent 51fcacb commit b36002f
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions program-runtime/src/loaded_programs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,13 +581,8 @@ impl LoadedPrograms {
}

pub fn unload_all_programs(&mut self) {
let keys = self
.entries
.keys()
.into_iter()
.map(|key| *key)
.collect::<Vec<Pubkey>>();
keys.iter().for_each(|key| self.unload_program(key));
let keys = self.entries.keys().copied().collect::<Vec<Pubkey>>();
keys.iter().for_each(|key| self.unload_program(&key));
}

fn unload_program_entries<'a>(
Expand Down

0 comments on commit b36002f

Please sign in to comment.