mirror of
https://github.com/Zenithsiz/zbuild.git
synced 2026-02-03 22:23:53 +00:00
Replaced some BTreeMaps with HashMaps.
This commit is contained in:
parent
2ee5f5796a
commit
fe5e7a7dcf
@ -5,7 +5,7 @@ use {
|
||||
crate::{rules::pattern::Pattern, util::ArcStr, AppError},
|
||||
itertools::{Itertools, PeekingNext},
|
||||
smallvec::SmallVec,
|
||||
std::collections::{BTreeMap, HashMap},
|
||||
std::collections::HashMap,
|
||||
};
|
||||
|
||||
/// An expression tree.
|
||||
@ -18,14 +18,14 @@ pub struct ExprTree<K> {
|
||||
}
|
||||
|
||||
// TODO: Flatten this?
|
||||
type PrefixTree<K> = BTreeMap<ArcStr, SuffixTree<K>>;
|
||||
type SuffixTree<K> = BTreeMap<ArcStr, (Option<Pattern>, K)>;
|
||||
type PrefixTree<K> = HashMap<ArcStr, SuffixTree<K>>;
|
||||
type SuffixTree<K> = HashMap<ArcStr, (Option<Pattern>, K)>;
|
||||
|
||||
impl<K> ExprTree<K> {
|
||||
/// Creates a new, empty, expression tree
|
||||
pub const fn new() -> Self {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
prefixes: BTreeMap::new(),
|
||||
prefixes: HashMap::new(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user