diff --git a/Cargo.toml b/Cargo.toml index 5c1d9db..1782903 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ version = "0.2.1-pre" authors = ["Diogo Sousa "] edition = "2021" -rust-version = "1.59.0" +rust-version = "1.80.0" homepage = "https://github.com/orium/dirty-debug" repository = "https://github.com/orium/dirty-debug" @@ -39,17 +39,16 @@ codecov = { repository = "orium/dirty-debug", branch = "main", service = "github fatal-warnings = [] [dependencies] -once_cell = "1.15.0" -dashmap = "5.4.0" +dashmap = "5.5.0" [dev-dependencies] -rand = "0.8.1" +rand = "0.8.5" indoc = "2.0.3" [lints.clippy] -all = { level = "warn", priority = -1 } -pedantic = { level = "warn", priority = -1 } -correctness = "deny" +all = { level = "warn", priority = -2 } +pedantic = { level = "warn", priority = -2 } +correctness = { level = "deny", priority = -1 } inline-always = "allow" match-bool = "allow" diff --git a/src/lib.rs b/src/lib.rs index 51a7efb..206ad4d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -47,17 +47,17 @@ //! ``` use dashmap::DashMap; -use once_cell::sync::Lazy; use std::fmt; use std::fs::File; use std::io; use std::io::Write; use std::net::TcpStream; use std::str::FromStr; +use std::sync::LazyLock; -static DIRTY_FILES: Lazy> = Lazy::new(DashMap::new); +static DIRTY_FILES: LazyLock> = LazyLock::new(DashMap::new); -static DIRTY_TCP: Lazy> = Lazy::new(DashMap::new); +static DIRTY_TCP: LazyLock> = LazyLock::new(DashMap::new); /// Writes a message to the given location. The message will be formatted. /// @@ -165,7 +165,6 @@ mod test { use std::io::Read; use std::net::TcpStream; use std::thread::JoinHandle; - use std::usize; struct TempFilepath { filepath: String, @@ -242,7 +241,7 @@ mod test { /// needs to be a string with a static lifetime to allow it to be stored without cloning it. macro_rules! make_static { ($str:expr) => {{ - static CELL: ::once_cell::sync::OnceCell = ::once_cell::sync::OnceCell::new(); + static CELL: ::std::sync::OnceLock = ::std::sync::OnceLock::new(); CELL.set($str.to_owned()).unwrap(); CELL.get().unwrap().as_str() }};