Rollup merge of #98165 - WaffleLapkin:once_things_renamings, r=m-ou-se
once cell renamings This PR does the renamings proposed in https://github.com/rust-lang/rust/issues/74465#issuecomment-1153703128 - Move/rename `lazy::{OnceCell, Lazy}` to `cell::{OnceCell, LazyCell}` - Move/rename `lazy::{SyncOnceCell, SyncLazy}` to `sync::{OnceLock, LazyLock}` (I used `Lazy...` instead of `...Lazy` as it seems to be more consistent, easier to pronounce, etc) ```@rustbot``` label +T-libs-api -T-libs
This commit is contained in:
commit
f351f347b8
40 changed files with 1250 additions and 1215 deletions
|
@ -1,7 +1,7 @@
|
|||
//! A helpful diagram for debugging dataflow problems.
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::lazy::SyncOnceCell;
|
||||
use std::sync::OnceLock;
|
||||
use std::{io, ops, str};
|
||||
|
||||
use regex::Regex;
|
||||
|
@ -590,7 +590,7 @@ where
|
|||
|
||||
macro_rules! regex {
|
||||
($re:literal $(,)?) => {{
|
||||
static RE: SyncOnceCell<regex::Regex> = SyncOnceCell::new();
|
||||
static RE: OnceLock<regex::Regex> = OnceLock::new();
|
||||
RE.get_or_init(|| Regex::new($re).unwrap())
|
||||
}};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue