Skip to content

Commit 30dd133

Browse files
Bump Rust toolchain channel from 1.81 to 1.82
Upgrade the version of Rust and related tooling from 1.81.0 to 1.82.0, which was recently released [1]. Additionally, this sets the version in the project manifest (Cargo.toml) for completeness (found via the new `cargo info` command). The `io_error_more` gate is still applicable - verified based on the corresponding GitHub issue and running the tests with the related code removed. However, it seems 1.83 will be the end of this, see [2]. For the update to Clippy, two new rules from the "Restrictions" group were explicitly enabled as they're relevant to this project. I also re- evaluated the allow directive for the `ignore_unit_patterns` lint and decided to just refactor the codebase in line with the lint instead (it was allowed in 44b36a5 originally, based on the reason given there I *guess* the noisiness has been reduced by Clippy in the meanwhile). Lastly, this fixes a problem in the ephemeral development environment where some `just` commands would fail because git did not recognize the working directory as trusted. This has been addressed by telling git to trust it. -- 1. https://blog.rust-lang.org/2024/10/17/Rust-1.82.0.html 2. rust-lang/rust#131396
1 parent 112d8f6 commit 30dd133

File tree

7 files changed

+20
-17
lines changed

7 files changed

+20
-17
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ To be able to contribute you need the following tooling:
110110

111111
- [git] v2;
112112
- [Just] v1;
113-
- [Rust] and [Cargo] v1.81 (edition 2021) with [Clippy], [rustfmt] (see `rust-toolchain.toml`);
113+
- [Rust] and [Cargo] v1.82 (edition 2021) with [Clippy], [rustfmt] (see `rust-toolchain.toml`);
114114
- (Optional) [cargo-all-features] v1.7.0 or later;
115115
- (Optional) [cargo-deny] v0.14.2 or later;
116116
- (Optional) [cargo-mutants] v23.5.0 or later;

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ authors = ["Eric Cornelissen <[email protected]>"]
66
repository = "https://github.com/ericcornelissen/rust-rm"
77
keywords = ["cli", "rm", "trash"]
88
categories = ["development-tools", "filesystem"]
9+
rust-version = "1.82"
910
edition = "2021"
1011

1112
[features]

Containerfile.dev

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# SPDX-License-Identifier: MIT-0
22

3-
FROM docker.io/rust:1.81.0-alpine3.20
3+
FROM docker.io/rust:1.82.0-alpine3.20
44

55
RUN apk add --no-cache \
6-
bash git just libressl-dev musl-dev perl
6+
bash git just libressl-dev musl-dev perl \
7+
&& \
8+
git config --global --add safe.directory /rust-rm
79

810
RUN cargo install \
911

Justfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,16 +228,16 @@ _profile_prepare:
228228
--deny clippy::missing_asserts_for_indexing \
229229
--deny clippy::missing_docs_in_private_items \
230230
--deny clippy::missing_enforced_import_renames \
231+
--deny clippy::pathbuf_init_then_push \
231232
--deny clippy::print_stderr \
232233
--deny clippy::print_stdout \
233234
--deny clippy::rc_buffer \
234235
--deny clippy::rc_mutex \
235236
--deny clippy::ref_patterns \
236237
--deny clippy::renamed_function_params \
237238
--deny clippy::string_lit_chars_any \
238-
--deny clippy::unwrap_used \
239-
\
240-
--allow clippy::ignored_unit_patterns
239+
--deny clippy::unused_result_ok \
240+
--deny clippy::unwrap_used
241241

242242
@_vet_verify_project:
243243
echo 'Running "cargo verify-project"...'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ rm -fq file1 file2
6262

6363
## Build from Source
6464

65-
To build from source you need [Rust] and [Cargo], v1.81 or higher, installed on your system. Then
65+
To build from source you need [Rust] and [Cargo], v1.82 or higher, installed on your system. Then
6666
run the command:
6767

6868
```shell

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Check out rustup at: https://rust-lang.github.io/rustup/index.html
22

33
[toolchain]
4-
channel = "1.81.0"
4+
channel = "1.82.0"
55
components = [
66
"cargo",
77
"clippy",

src/main.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ mod cli {
988988
type Parameters = ();
989989
type Strategy = BoxedStrategy<Self>;
990990

991-
fn arbitrary_with(_: ()) -> Self::Strategy {
991+
fn arbitrary_with((): ()) -> Self::Strategy {
992992
const KNOWN_FLAG_PATTERN: &str = "\
993993
--blind|-b|\
994994
--dir|-d|\
@@ -1033,7 +1033,7 @@ mod cli {
10331033
type Parameters = ();
10341034
type Strategy = BoxedStrategy<Self>;
10351035

1036-
fn arbitrary_with(_: ()) -> Self::Strategy {
1036+
fn arbitrary_with((): ()) -> Self::Strategy {
10371037
let size_range = 1..=16;
10381038
prop::collection::vec(TestArg::arbitrary(), size_range)
10391039
.prop_map(|v| Self(v.into_iter().map(TestArg::inner).collect()))
@@ -1075,7 +1075,7 @@ mod cli {
10751075
type Parameters = ();
10761076
type Strategy = BoxedStrategy<Self>;
10771077

1078-
fn arbitrary_with(_: ()) -> Self::Strategy {
1078+
fn arbitrary_with((): ()) -> Self::Strategy {
10791079
let size_range = 1..=16;
10801080
prop::collection::vec(TestArg::arbitrary(), size_range)
10811081
.prop_flat_map(|vec| (0..vec.len(), Just(vec)))
@@ -1100,7 +1100,7 @@ mod cli {
11001100
type Parameters = ();
11011101
type Strategy = BoxedStrategy<Self>;
11021102

1103-
fn arbitrary_with(_: ()) -> Self::Strategy {
1103+
fn arbitrary_with((): ()) -> Self::Strategy {
11041104
const KNOWN_VAR_PATTERN: &str = "RUST_RM_GNU_MODE|DEBUG";
11051105
const GENERAL_VAR_PATTERN: &str = "[a-zA-Z_]+";
11061106

@@ -1135,7 +1135,7 @@ mod cli {
11351135
type Parameters = ();
11361136
type Strategy = BoxedStrategy<Self>;
11371137

1138-
fn arbitrary_with(_: ()) -> Self::Strategy {
1138+
fn arbitrary_with((): ()) -> Self::Strategy {
11391139
let size_range = 1..=16;
11401140
prop::collection::vec(TestVar::arbitrary(), size_range)
11411141
.prop_map(|v| Self(v.into_iter().map(TestVar::inner).collect()))
@@ -1165,7 +1165,7 @@ mod cli {
11651165
type Parameters = ();
11661166
type Strategy = BoxedStrategy<Self>;
11671167

1168-
fn arbitrary_with(_: ()) -> Self::Strategy {
1168+
fn arbitrary_with((): ()) -> Self::Strategy {
11691169
let size_range = 1..=16;
11701170
prop::collection::vec(TestVar::arbitrary(), size_range)
11711171
.prop_flat_map(|vec| (0..vec.len(), Just(vec)))
@@ -2758,7 +2758,7 @@ mod rm {
27582758
trace!("remove {entry}");
27592759

27602760
if entry.is_dir() && !fs::is_empty(&entry) {
2761-
// This case is handled explicitly because, as of Rust 1.81, the `io::ErrorKind` variant
2761+
// This case is handled explicitly because, as of Rust 1.82, the `io::ErrorKind` variant
27622762
// is still experimental (gate "io_error_more") and so would result in an unknown error.
27632763
// This implementation leaves a possibility for a TOCTOU issue, but this will be handled
27642764
// safely as `std::fs::remove_dir` doesn't remove non-empty directories.
@@ -3284,7 +3284,7 @@ mod transform {
32843284
type Parameters = ();
32853285
type Strategy = BoxedStrategy<Self>;
32863286

3287-
fn arbitrary_with(_: ()) -> Self::Strategy {
3287+
fn arbitrary_with((): ()) -> Self::Strategy {
32883288
"(\\.\\.?SEPARATOR)*\\."
32893289
.prop_map(|v| CurrentDirPath(v.replace("SEPARATOR", MAIN_SEPARATOR_STR)))
32903290
.boxed()
@@ -3301,7 +3301,7 @@ mod transform {
33013301
type Parameters = ();
33023302
type Strategy = BoxedStrategy<Self>;
33033303

3304-
fn arbitrary_with(_: ()) -> Self::Strategy {
3304+
fn arbitrary_with((): ()) -> Self::Strategy {
33053305
"(\\.\\.?SEPARATOR)*\\.\\."
33063306
.prop_map(|v| ParentDirPath(v.replace("SEPARATOR", MAIN_SEPARATOR_STR)))
33073307
.boxed()

0 commit comments

Comments
 (0)