Skip to content

Commit

Permalink
chore(deps): remove once_cell crate (#4409)
Browse files Browse the repository at this point in the history
  • Loading branch information
Conaclos authored Oct 28, 2024
1 parent eb13885 commit f9d278a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion xtask/coverage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ biome_rowan = { workspace = true }
biome_string_case = { workspace = true }
colored = "2.1.0"
indicatif = { version = "0.17.8", features = ["improved_unicode"] }
once_cell = "1.20.0"
pico-args = { version = "0.5.0", features = ["eq-separator"] }
regex = { workspace = true }
serde = { workspace = true, features = ["derive"] }
Expand Down
12 changes: 4 additions & 8 deletions xtask/coverage/src/js/test262.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,11 @@ impl TestSuite for Test262TestSuite {
}

fn read_metadata(code: &str) -> io::Result<MetaData> {
use once_cell::sync::Lazy;
// Regular expression to retrieve the metadata of a test.
let meta_regex = Regex::new(r"/\*\-{3}((?:.|\n)*)\-{3}\*/")
.expect("could not compile metadata regular expression");

/// Regular expression to retrieve the metadata of a test.
static META_REGEX: Lazy<Regex> = Lazy::new(|| {
Regex::new(r"/\*\-{3}((?:.|\n)*)\-{3}\*/")
.expect("could not compile metadata regular expression")
});

let yaml = META_REGEX
let yaml = meta_regex
.captures(code)
.ok_or_else(|| io::Error::new(io::ErrorKind::InvalidData, "no metadata found"))?
.get(1)
Expand Down

0 comments on commit f9d278a

Please sign in to comment.