summaryrefslogtreecommitdiff
path: root/cli/lsp/path_to_regex.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/lsp/path_to_regex.rs')
-rw-r--r--cli/lsp/path_to_regex.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/cli/lsp/path_to_regex.rs b/cli/lsp/path_to_regex.rs
index ce935ee27..393591785 100644
--- a/cli/lsp/path_to_regex.rs
+++ b/cli/lsp/path_to_regex.rs
@@ -29,15 +29,14 @@
use deno_core::anyhow::anyhow;
use deno_core::error::AnyError;
use fancy_regex::Regex as FancyRegex;
+use once_cell::sync::Lazy;
use regex::Regex;
use std::collections::HashMap;
use std::fmt;
use std::iter::Peekable;
-lazy_static::lazy_static! {
- static ref ESCAPE_STRING_RE: Regex =
- Regex::new(r"([.+*?=^!:${}()\[\]|/\\])").unwrap();
-}
+static ESCAPE_STRING_RE: Lazy<Regex> =
+ Lazy::new(|| Regex::new(r"([.+*?=^!:${}()\[\]|/\\])").unwrap());
#[derive(Debug, PartialEq, Eq)]
enum TokenType {