Skip to content

Commit 61a93a5

Browse files
committed
Bump MSRV to 1.75
``` error[E0015]: cannot call non-const fn `zeroed::<sem_t>` in statics --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ctrlc-3.5.0/src/platform/unix/mod.rs:15:55 | 15 | static mut SEMAPHORE: nix::libc::sem_t = unsafe { std::mem::zeroed() }; | ^^^^^^^^^^^^^^^^^^ | = note: calls in statics are limited to constant functions, tuple structs and tuple variants = note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell ```
1 parent 8933ed6 commit 61a93a5

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
name = "cargo-hack"
33
version = "0.6.37" #publish:version
44
edition = "2021"
5-
rust-version = "1.71" # For cargo-config2
5+
# NB: Sync with the MSRV in "From source" section in README.md.
6+
rust-version = "1.75" # For ctrlc
67
license = "Apache-2.0 OR MIT"
78
repository = "https://github.com/taiki-e/cargo-hack"
89
keywords = ["cargo", "subcommand", "testing"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ fields of [`cargo metadata`][cargo-metadata].*
469469
cargo +stable install cargo-hack --locked
470470
```
471471

472-
Currently, installing cargo-hack requires rustc 1.71+.
472+
Currently, installing cargo-hack requires rustc 1.75+.
473473

474474
cargo-hack is usually runnable with Cargo versions older than the Rust version
475475
required for installation (e.g., `cargo +1.31 hack check`). Currently, to run

src/main.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,7 @@ struct Progress {
167167

168168
impl Progress {
169169
fn in_partition(&self, partition: &Partition) -> bool {
170-
// div_ceil requires Rust 1.73
171-
let mut chunk_count = self.total / partition.count;
172-
if self.total % partition.count != 0 {
173-
chunk_count += 1;
174-
}
175-
let current_index = self.count / chunk_count;
170+
let current_index = self.count / self.total.div_ceil(partition.count);
176171
current_index == partition.index
177172
}
178173
}

0 commit comments

Comments
 (0)