Skip to content

Commit 63c24a3

Browse files
committed
replace once_cell with std equivalents
1 parent 5e95c3c commit 63c24a3

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

Cargo.lock

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ clap = { version = "4.5.31", features = ["derive"] } # parse CLI arguments
3030
clap-cargo = { version = "0.15.2", features = ["cargo_metadata"] }
3131
dirs = "6.0.0" # common directories
3232
indicatif = "0.17.11" # UI
33-
once_cell = "1.20.3" # lazy data structures and thunking
3433
owo-colors = "4.1.0" # color support for the terminal
3534
petgraph = "0.7.1" # graph data structures
3635
rust-releases = { version = "0.29.0", default-features = false, features = ["rust-changelog"] } # get the available rust versions

src/external_command/rustup_command.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,16 @@ impl RustupCommand {
121121

122122
Ok(RustupOutput {
123123
output,
124-
stdout: once_cell::sync::OnceCell::new(),
125-
stderr: once_cell::sync::OnceCell::new(),
124+
stdout: std::cell::OnceCell::new(),
125+
stderr: std::cell::OnceCell::new(),
126126
})
127127
}
128128
}
129129

130130
pub struct RustupOutput {
131131
output: std::process::Output,
132-
stdout: once_cell::sync::OnceCell<String>,
133-
stderr: once_cell::sync::OnceCell<String>,
132+
stdout: std::cell::OnceCell<String>,
133+
stderr: std::cell::OnceCell<String>,
134134
}
135135

136136
impl RustupOutput {

src/reporter/formatting.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
use once_cell::sync::OnceCell;
1+
use std::sync::OnceLock;
22
use tabled::settings::{Margin, Style};
33
use tabled::{Table, Tabled};
44

5-
static TERM_WIDTH: OnceCell<usize> = OnceCell::new();
5+
static TERM_WIDTH: OnceLock<usize> = OnceLock::new();
66

77
static TABLE_CORRECTION: usize = 4;
88

src/rust/toolchain.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use once_cell::sync::OnceCell;
21
use rust_releases::semver;
2+
use std::cell::OnceCell;
33

44
#[derive(Debug, Clone, Eq, PartialEq, serde::Serialize)]
55
#[serde(rename_all = "snake_case")]

0 commit comments

Comments
 (0)