We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d62ed88 commit 7a13d79Copy full SHA for 7a13d79
src/tools/tidy/src/lib.rs
@@ -13,8 +13,9 @@ use termcolor::WriteColor;
13
14
macro_rules! static_regex {
15
($re:literal) => {{
16
- static RE: ::std::sync::OnceLock<::regex::Regex> = ::std::sync::OnceLock::new();
17
- RE.get_or_init(|| ::regex::Regex::new($re).unwrap())
+ static RE: ::std::sync::LazyLock<::regex::Regex> =
+ ::std::sync::LazyLock::new(|| ::regex::Regex::new($re).unwrap());
18
+ &*RE
19
}};
20
}
21
0 commit comments