Skip to content

Commit 7938d69

Browse files
committed
Fix lint errors with newer Rust
Plus update to Rust 2024, and clean up crate configs. Fixes the CI failures seen in #57: ``` warning: a method with this name may be added to the standard library in the future --> shared/src/inventory_help.rs:119:10 | 119 | file.unlock()?; | ^^^^^^ | = warning: once this associated item is added to the standard library, the ambiguity may cause an error or change in behavior! = note: for more information, see issue #48919 <rust-lang/rust#48919> = help: call with fully qualified syntax `fs2::FileExt::unlock(...)` to keep using the current method = note: `#[warn(unstable_name_collisions)]` on by default ```
1 parent a41f31c commit 7938d69

File tree

6 files changed

+53
-49
lines changed

6 files changed

+53
-49
lines changed

Cargo.lock

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

Cargo.toml

+5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
[workspace]
2+
resolver = "3"
23
members = [
34
"jruby_executable",
45
"ruby_executable",
56
"shared",
67
]
78

9+
[workspace.package]
10+
edition = "2024"
11+
rust-version = "1.85"
12+
813
[workspace.dependencies]
914
java-properties = "2.0.0"
1015
glob = "0.3.1"

jruby_executable/Cargo.toml

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "jruby_executable"
3-
version = "0.1.0"
4-
edition = "2021"
3+
edition.workspace = true
4+
rust-version.workspace = true
55

66
[[bin]]
77
name = "jruby_build"
@@ -17,20 +17,20 @@ path = "src/bin/jruby_changelog.rs"
1717

1818
[dependencies]
1919
java-properties = { workspace = true }
20-
glob = { workspace = true}
21-
clap = { workspace = true}
22-
shared = { workspace = true}
23-
indoc = { workspace = true}
24-
lazy_static = { workspace = true}
25-
flate2 = { workspace = true}
26-
fs-err = { workspace = true}
27-
fun_run = { workspace = true}
28-
nom = { workspace = true}
29-
regex = { workspace = true}
30-
reqwest = { workspace = true}
31-
tar = { workspace = true}
32-
tempfile = { workspace = true}
33-
thiserror = { workspace = true}
20+
glob = { workspace = true }
21+
clap = { workspace = true }
22+
shared = { workspace = true }
23+
indoc = { workspace = true }
24+
lazy_static = { workspace = true }
25+
flate2 = { workspace = true }
26+
fs-err = { workspace = true }
27+
fun_run = { workspace = true }
28+
nom = { workspace = true }
29+
regex = { workspace = true }
30+
reqwest = { workspace = true }
31+
tar = { workspace = true }
32+
tempfile = { workspace = true }
33+
thiserror = { workspace = true }
3434
bullet_stream = { workspace = true }
3535
libherokubuildpack = { workspace = true }
3636
chrono = { workspace = true }

ruby_executable/Cargo.toml

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
[package]
22
name = "ruby_executable"
3-
version = "0.1.0"
4-
edition = "2021"
3+
edition.workspace = true
4+
rust-version.workspace = true
55

66
[dependencies]
7-
clap = { workspace = true}
8-
shared = { workspace = true}
9-
indoc = { workspace = true}
10-
flate2 = { workspace = true}
11-
fs-err = { workspace = true}
12-
fun_run = { workspace = true}
13-
nom = { workspace = true}
14-
regex = { workspace = true}
15-
reqwest = { workspace = true}
16-
tar = { workspace = true}
17-
tempfile = { workspace = true}
18-
thiserror = { workspace = true}
7+
clap = { workspace = true }
8+
shared = { workspace = true }
9+
indoc = { workspace = true }
10+
flate2 = { workspace = true }
11+
fs-err = { workspace = true }
12+
fun_run = { workspace = true }
13+
nom = { workspace = true }
14+
regex = { workspace = true }
15+
reqwest = { workspace = true }
16+
tar = { workspace = true }
17+
tempfile = { workspace = true }
18+
thiserror = { workspace = true }
1919
bullet_stream = { workspace = true }
2020
libherokubuildpack = { workspace = true }
2121
chrono = { workspace = true }

shared/Cargo.toml

+14-15
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
[package]
22
name = "shared"
3-
version = "0.1.0"
4-
edition = "2021"
3+
edition.workspace = true
4+
rust-version.workspace = true
55

66
[[bin]]
77
name = "inventory_check"
88
path = "src/bin/inventory_check.rs"
99

1010
[dependencies]
11-
glob = { workspace = true}
12-
clap = { workspace = true}
13-
indoc = { workspace = true}
14-
flate2 = { workspace = true}
15-
fs-err = { workspace = true}
16-
fun_run = { workspace = true}
17-
nom = { workspace = true}
18-
regex = { workspace = true}
19-
reqwest = { workspace = true}
20-
tar = { workspace = true}
21-
tempfile = { workspace = true}
22-
thiserror = { workspace = true}
11+
glob = { workspace = true }
12+
clap = { workspace = true }
13+
indoc = { workspace = true }
14+
flate2 = { workspace = true }
15+
fs-err = { workspace = true }
16+
fun_run = { workspace = true }
17+
nom = { workspace = true }
18+
regex = { workspace = true }
19+
reqwest = { workspace = true }
20+
tar = { workspace = true }
21+
tempfile = { workspace = true }
22+
thiserror = { workspace = true }
2323
bullet_stream = { workspace = true }
2424
sha2 = { workspace = true }
2525
chrono = { workspace = true }
@@ -31,7 +31,6 @@ rayon = { workspace = true }
3131
hex = { workspace = true }
3232
gem_version = { workspace = true }
3333

34-
3534
[dev-dependencies]
3635
tiny_http = "0.12.0"
3736
indoc = "2.0.5"

shared/src/inventory_help.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ where
116116
file.read_to_string(&mut contents).map_err(Error::FsError)?;
117117
file.rewind()?;
118118
let result: Result<T, Box<dyn std::error::Error>> = f(&mut file, &contents);
119-
file.unlock()?;
119+
fs2::FileExt::unlock(&file)?;
120120
result
121121
}
122122

0 commit comments

Comments
 (0)