--- a/rust/hg-core/src/lib.rs Mon Dec 02 14:44:26 2019 +0100
+++ b/rust/hg-core/src/lib.rs Mon Oct 14 13:57:30 2019 +0200
@@ -24,6 +24,8 @@
pub use filepatterns::{
build_single_regex, read_pattern_file, PatternSyntax, PatternTuple,
};
+use std::collections::HashMap;
+use twox_hash::RandomXxHashBuilder64;
/// Mercurial revision numbers
///
@@ -53,6 +55,11 @@
pub type LineNumber = usize;
+/// Rust's default hasher is too slow because it tries to prevent collision
+/// attacks. We are not concerned about those: if an ill-minded person has
+/// write access to your repository, you have other issues.
+pub type FastHashMap<K, V> = HashMap<K, V, RandomXxHashBuilder64>;
+
#[derive(Clone, Debug, PartialEq)]
pub enum GraphError {
ParentOutOfRange(Revision),