Change HashMap to BTreeMap.

This commit is contained in:
Stephen Chung
2021-03-23 12:13:53 +08:00
parent 7a0032fc89
commit f70225ca1d
19 changed files with 139 additions and 214 deletions

View File

@@ -1,4 +1,4 @@
use std::collections::HashMap;
use std::collections::BTreeMap;
use quote::{quote, ToTokens};
@@ -238,8 +238,8 @@ pub fn check_rename_collisions(fns: &Vec<ExportedFn>) -> Result<(), syn::Error>
})
}
let mut renames = HashMap::<String, proc_macro2::Span>::new();
let mut fn_defs = HashMap::<String, proc_macro2::Span>::new();
let mut renames = BTreeMap::<String, proc_macro2::Span>::new();
let mut fn_defs = BTreeMap::<String, proc_macro2::Span>::new();
for item_fn in fns.iter() {
if !item_fn.params().name.is_empty() || item_fn.params().special != FnSpecialAccess::None {