Skip to content

Commit 7dc6e32

Browse files
authored
Merge pull request #52 from capickett/deterministic-hash
Use rustc-hash for deterministic hashing
2 parents e402885 + da96813 commit 7dc6e32

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/expand.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use syn::{
99
TypeParamBound, TypePath, WhereClause, WherePredicate,
1010
};
1111

12-
use std::collections::HashMap;
12+
use std::collections::BTreeMap;
1313

1414
pub(crate) fn derive(input: &DeriveInput) -> Result<TokenStream> {
1515
let impls = match &input.data {
@@ -224,9 +224,9 @@ fn add_display_constraint_to_type_predicate(
224224
fn extract_trait_constraints_from_source(
225225
where_clause: &WhereClause,
226226
type_params: &[&TypeParam],
227-
) -> HashMap<Ident, Vec<TraitBound>> {
227+
) -> BTreeMap<Ident, Vec<TraitBound>> {
228228
// Add trait bounds provided at the declaration site of type parameters for the struct/enum.
229-
let mut param_constraint_mapping: HashMap<Ident, Vec<TraitBound>> = type_params
229+
let mut param_constraint_mapping: BTreeMap<Ident, Vec<TraitBound>> = type_params
230230
.iter()
231231
.map(|type_param| {
232232
let trait_bounds: Vec<TraitBound> = type_param

0 commit comments

Comments
 (0)