mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 22:31:47 +00:00
Move bindings to FNV map (#747)
This commit is contained in:
parent
8961da7b89
commit
62d4096be3
2 changed files with 13 additions and 12 deletions
|
@ -1,6 +1,6 @@
|
|||
use std::collections::BTreeMap;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
||||
use fnv::FnvHashMap;
|
||||
use rustpython_ast::{Expr, Keyword};
|
||||
use rustpython_parser::ast::{Located, Location};
|
||||
|
||||
|
@ -54,7 +54,7 @@ pub struct Scope<'a> {
|
|||
pub id: usize,
|
||||
pub kind: ScopeKind<'a>,
|
||||
pub import_starred: bool,
|
||||
pub values: BTreeMap<String, Binding>,
|
||||
pub values: FnvHashMap<String, Binding>,
|
||||
}
|
||||
|
||||
impl<'a> Scope<'a> {
|
||||
|
@ -63,7 +63,7 @@ impl<'a> Scope<'a> {
|
|||
id: id(),
|
||||
kind,
|
||||
import_starred: false,
|
||||
values: BTreeMap::new(),
|
||||
values: FnvHashMap::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue