diff --git a/Cargo.lock b/Cargo.lock index 88c820f..4487f00 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -257,12 +257,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "once_cell" -version = "1.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ea5043e58958ee56f3e15a90aee535795cd7dfd319846288d93c5b57d85cbe" - [[package]] name = "png" version = "0.17.13" @@ -359,7 +353,6 @@ dependencies = [ "iter_fixed", "log", "nom", - "once_cell", "profiling", "regex", "thiserror", diff --git a/Cargo.toml b/Cargo.toml index 7c0e0b0..1e7b024 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,6 @@ image = { version = "0.25", default-features = false, features = ["png"] } iter_fixed = "0.4" log = "0.4" nom = "7.1" -once_cell = "1.19" profiling = "1.0" regex = "1.10" thiserror = "1.0" diff --git a/src/vobsub/idx.rs b/src/vobsub/idx.rs index 2f8aa77..4e5d240 100644 --- a/src/vobsub/idx.rs +++ b/src/vobsub/idx.rs @@ -1,12 +1,12 @@ //! Parse a file in `*.idx` format. use log::trace; -use once_cell::sync::Lazy; use regex::Regex; use std::{ fs, io::{self, prelude::*, BufReader}, path::Path, + sync::LazyLock, }; use super::{palette, sub, IResultExt, Palette, VobSubError}; @@ -90,7 +90,8 @@ where T: std::io::Read, Err: Fn(io::Error) -> VobSubError, { - static KEY_VALUE: Lazy = Lazy::new(|| Regex::new("^([A-Za-z/ ]+): (.*)").unwrap()); + static KEY_VALUE: LazyLock = + LazyLock::new(|| Regex::new("^([A-Za-z/ ]+): (.*)").unwrap()); let mut palette_val: Option = None; let mut buf = String::with_capacity(256);