chore: Replace lazy_static Mutex with const. (#2693)
Mutex::new() is const-stable as of Rust 1.63. Release Notes: - N/A
This commit is contained in:
parent
79ece8a86e
commit
abf3b4a54e
9 changed files with 8 additions and 27 deletions
|
@ -4,7 +4,6 @@ mod syntax_map_tests;
|
|||
use crate::{Grammar, InjectionConfig, Language, LanguageRegistry};
|
||||
use collections::HashMap;
|
||||
use futures::FutureExt;
|
||||
use lazy_static::lazy_static;
|
||||
use parking_lot::Mutex;
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
|
@ -25,9 +24,7 @@ thread_local! {
|
|||
static PARSER: RefCell<Parser> = RefCell::new(Parser::new());
|
||||
}
|
||||
|
||||
lazy_static! {
|
||||
static ref QUERY_CURSORS: Mutex<Vec<QueryCursor>> = Default::default();
|
||||
}
|
||||
static QUERY_CURSORS: Mutex<Vec<QueryCursor>> = Mutex::new(vec![]);
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct SyntaxMap {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue