diff options
| author | Glenn Smith <glenn@vector35.com> | 2024-04-29 19:07:12 -0400 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2024-06-04 14:37:39 -0400 |
| commit | 8404673844972989990576235419181774028112 (patch) | |
| tree | cc5ae10f0741a297c30d355651418e7d6cefc4ad /rust/examples/pdb-ng/src/symbol_parser.rs | |
| parent | dcd9cc4f62138ef94c6c496fc214045f44e62d4d (diff) | |
PDB: Swap hashmap -> btreemap for determinism
Diffstat (limited to 'rust/examples/pdb-ng/src/symbol_parser.rs')
| -rw-r--r-- | rust/examples/pdb-ng/src/symbol_parser.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rust/examples/pdb-ng/src/symbol_parser.rs b/rust/examples/pdb-ng/src/symbol_parser.rs index 7f418747..cefb7dc2 100644 --- a/rust/examples/pdb-ng/src/symbol_parser.rs +++ b/rust/examples/pdb-ng/src/symbol_parser.rs @@ -13,6 +13,7 @@ // limitations under the License. use std::collections::{BTreeMap, HashMap, HashSet}; +use std::mem; use anyhow::{anyhow, Result}; use itertools::Itertools; @@ -513,9 +514,8 @@ impl<'a, S: Source<'a> + 'a> PDBParserInstance<'a, S> { } } - let filtered_symbols = self - .indexed_symbols - .drain() + let filtered_symbols = mem::replace(&mut self.indexed_symbols, BTreeMap::new()) + .into_iter() .filter_map(|(idx, sym)| { if final_symbols.contains(&idx) { Some(sym) |
