mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-23 04:35:00 +00:00
build: rearrange dependencies (#399)
This commit is contained in:
parent
1b769a4ddd
commit
4acc39b237
8 changed files with 261 additions and 229 deletions
|
@ -24,8 +24,8 @@ use std::{
|
|||
|
||||
use dashmap::{DashMap, SharedValue};
|
||||
use ecow::EcoString;
|
||||
use fxhash::FxHasher;
|
||||
use hashbrown::{hash_map::RawEntryMut, HashMap};
|
||||
use rustc_hash::FxHasher;
|
||||
use triomphe::Arc;
|
||||
use typst::{foundations::Str, syntax::ast::Ident};
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ use std::ops;
|
|||
|
||||
pub use ena::undo_log::Snapshot;
|
||||
|
||||
type FxHashMap<K, V> = fxhash::FxHashMap<K, V>;
|
||||
type FxHashMap<K, V> = rustc_hash::FxHashMap<K, V>;
|
||||
|
||||
pub type SnapshotMapStorage<K, V> = SnapshotMap<K, V, FxHashMap<K, V>, ()>;
|
||||
pub type SnapshotMapRef<'a, K, V, L> = SnapshotMap<K, V, &'a mut FxHashMap<K, V>, &'a mut L>;
|
||||
|
|
|
@ -21,8 +21,17 @@ pub(crate) use sig::*;
|
|||
mod tests {
|
||||
use super::*;
|
||||
use crate::adt::interner::Interned;
|
||||
use fxhash::hash64;
|
||||
use reflexo::vector::ir::DefId;
|
||||
use rustc_hash::FxHasher;
|
||||
use std::hash::{Hash, Hasher};
|
||||
|
||||
/// A convenience function for when you need a quick 64-bit hash.
|
||||
#[inline]
|
||||
pub fn hash64<T: Hash + ?Sized>(v: &T) -> u64 {
|
||||
let mut state = FxHasher::default();
|
||||
v.hash(&mut state);
|
||||
state.finish()
|
||||
}
|
||||
|
||||
pub fn var_ins(s: &str) -> Ty {
|
||||
Ty::Var(TypeVar::new(s.into(), DefId(hash64(s))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue