Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ clap_complete = "4.4"
clap_mangen = "0.3"
compare = "0.1.0"
crossterm = { version = "0.29.0", default-features = false }
ctor = "0.12.0"
ctor = "1.0.0"
ctrlc = { version = "3.5.2", features = ["termination"] }
divan = { package = "codspeed-divan-compat", version = "4.4.1" }
dns-lookup = { version = "3.0.0" }
Expand Down
2 changes: 1 addition & 1 deletion src/uu/stdbuf/src/libstdbuf/src/libstdbuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::io::{Write, stderr};
use std::{env, ptr};

// This runs automatically when the library is loaded via LD_PRELOAD
#[ctor]
#[ctor(unsafe)]
fn init() {
unsafe { __stdbuf() };
}
Expand Down
3 changes: 1 addition & 2 deletions tests/test_util_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ pub const TESTS_BINARY: &str = env!("CARGO_BIN_EXE_coreutils");
// Set the environment variable for any tests

// Use the ctor attribute to run this function before any tests
#[ctor::ctor]
#[ctor::ctor(unsafe)]
fn init() {
// No need for unsafe here
unsafe {
env::set_var("UUTESTS_BINARY_PATH", TESTS_BINARY);
}
Expand Down
3 changes: 1 addition & 2 deletions tests/test_uudoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ pub const TESTS_BINARY: &str = env!("CARGO_BIN_EXE_uudoc");
// Set the environment variable for any tests

// Use the ctor attribute to run this function before any tests
#[ctor::ctor]
#[ctor::ctor(unsafe)]
fn init() {
// No need for unsafe here
unsafe {
env::set_var("UUTESTS_BINARY_PATH", TESTS_BINARY);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::env;
pub const TESTS_BINARY: &str = env!("CARGO_BIN_EXE_coreutils");

// Use the ctor attribute to run this function before any tests
#[ctor::ctor]
#[ctor::ctor(unsafe)]
fn init() {
// Allow overriding the binary path (e.g. to test a WASI binary via wasmtime)
if env::var("UUTESTS_BINARY_PATH").is_err() {
Expand Down
2 changes: 1 addition & 1 deletion tests/uutests/src/lib/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3244,7 +3244,7 @@ mod tests {

// Create a init for the test with a fake value (not needed)
#[cfg(test)]
#[ctor::ctor]
#[ctor::ctor(unsafe)]
fn init() {
unsafe {
env::set_var("UUTESTS_BINARY_PATH", "");
Expand Down
Loading