chore: replace regex with regex-lite, where appropriate (#1200)
As explained on https://crates.io/crates/regex-lite, `regex-lite` is a lighter alternative to `regex` and seems to be sufficient for our purposes.
This commit is contained in:
@@ -33,7 +33,7 @@ ratatui = { version = "0.29.0", features = [
|
||||
"unstable-rendered-line-info",
|
||||
] }
|
||||
ratatui-image = "8.0.0"
|
||||
regex = "1"
|
||||
regex-lite = "0.1"
|
||||
serde_json = "1"
|
||||
shlex = "1.3.0"
|
||||
strum = "0.27.1"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#![allow(clippy::expect_used)]
|
||||
|
||||
use regex::Regex;
|
||||
use regex_lite::Regex;
|
||||
|
||||
// This is defined in its own file so we can limit the scope of
|
||||
// `allow(clippy::expect_used)` because we cannot scope it to the `lazy_static!`
|
||||
|
||||
@@ -71,7 +71,7 @@ fn rewrite_file_citations<'a>(
|
||||
None => return Cow::Borrowed(src),
|
||||
};
|
||||
|
||||
CITATION_REGEX.replace_all(src, |caps: ®ex::Captures<'_>| {
|
||||
CITATION_REGEX.replace_all(src, |caps: ®ex_lite::Captures<'_>| {
|
||||
let file = &caps[1];
|
||||
let start_line = &caps[2];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user