diff options
author | Yiyu Lin <linyiyu1992@gmail.com> | 2023-04-13 09:08:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-13 03:08:01 +0200 |
commit | d790ea7d533c3c48b09a2f16f3fef549aa96be78 (patch) | |
tree | b31fc35baf1f634054f52e94626f0399d187b99b /cli/lsp/path_to_regex.rs | |
parent | 19c3e4f6dc31fd78e2793d0596d6a9cc3a30580a (diff) |
refactor(cli,ext,ops): cleanup `regex` with `lazy-regex` (#17296)
- bump deps: the newest `lazy-regex` need newer `oncecell` and
`regex`
- reduce `unwrap`
- remove dep `lazy_static`
- make more regex cached
---------
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/lsp/path_to_regex.rs')
-rw-r--r-- | cli/lsp/path_to_regex.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/lsp/path_to_regex.rs b/cli/lsp/path_to_regex.rs index dcad6b039..01dbc0287 100644 --- a/cli/lsp/path_to_regex.rs +++ b/cli/lsp/path_to_regex.rs @@ -37,7 +37,7 @@ use std::fmt::Write as _; use std::iter::Peekable; static ESCAPE_STRING_RE: Lazy<Regex> = - Lazy::new(|| Regex::new(r"([.+*?=^!:${}()\[\]|/\\])").unwrap()); + lazy_regex::lazy_regex!(r"([.+*?=^!:${}()\[\]|/\\])"); #[derive(Debug, PartialEq, Eq)] enum TokenType { |