Skip to content

Commit

Permalink
Replace once_cell crate with standard library's OnceLock
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Aug 25, 2023
1 parent 77f314c commit 8c19ab4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ rust-version = "1.36"
[lib]
doc-scrape-examples = false

[dev-dependencies]
once_cell = "1"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
rustdoc-args = ["--generate-link-to-definition"]
4 changes: 2 additions & 2 deletions src/tests.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use super::*;
use once_cell::sync::OnceCell;
use std::sync::OnceLock;

macro_rules! range {
($text:expr) => {{
static CHARS: OnceCell<Vec<char>> = OnceCell::new();
static CHARS: OnceLock<Vec<char>> = OnceLock::new();
let chars = CHARS.get_or_init(|| $text.chars().collect());
Range::new(chars, ..)
}};
Expand Down

0 comments on commit 8c19ab4

Please sign in to comment.