From 091e25d8d3d03c561b0f40c629351dc20b1c9f3a Mon Sep 17 00:00:00 2001 From: Arthur Beck Date: Fri, 27 Dec 2024 16:35:34 -0600 Subject: [PATCH] Deprecated edition field in rust-config.toml as it's kinda pointless --- Cargo.lock | 2 +- Cargo.toml | 2 +- rust-config.toml | 4 ++-- src/lib.rs | 5 ++++- src/main.rs | 1 - src/template/template.Cargo.toml | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cc41e14..498a0e5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3245,7 +3245,7 @@ dependencies = [ [[package]] name = "rust-pkg-gen" -version = "1.1.0" +version = "1.2.0" dependencies = [ "anyhow", "cargo-local-registry", diff --git a/Cargo.toml b/Cargo.toml index 8cab327..4db1cd2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rust-pkg-gen" -version = "1.1.0" +version = "1.2.0" edition = "2021" license = "MIT OR Apache-2.0" description = "Creates so-called rust 'packages' containing rust toolchains and crates." diff --git a/rust-config.toml b/rust-config.toml index d2665fc..0cd26da 100644 --- a/rust-config.toml +++ b/rust-config.toml @@ -1,6 +1,6 @@ [x64_package_linux_rust_pkg_gen] toolchains = [ - { edition = "2021", channel = "nightly", components = [ + { channel = "nightly", components = [ "rustfmt", "rustc", "cargo", @@ -32,7 +32,7 @@ x86_64-unknown-linux-gnu = ["gz-only"] [x64_package_linux_rust_pkg_gen2] toolchains = [ - { edition = "2021", channel = "stable", components = [ + { channel = "stable", components = [ "rust-docs", "rustc", "cargo", diff --git a/src/lib.rs b/src/lib.rs index a94c8f8..679699b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -23,7 +23,10 @@ mod tests; pub struct Toolchain { /// The edition of rust to use. Should be one of 2015, 2018, 2021, or 2024, /// but isn't directly validated. Validation could be changed in the future. - pub edition: String, + /// + /// Deprecated as it's pretty much unnecessary + #[deprecated(since = "1.2.0")] + pub edition: Option, /// The channel of rust to use. Should be in [`targets::RELEASE_CHANNELS`]. pub channel: String, /// The components of rust to install. diff --git a/src/main.rs b/src/main.rs index 39a0f5a..47fb8d3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -198,7 +198,6 @@ fn main() { path, std::str::from_utf8(file.data.as_ref()) .unwrap() - .replace("{?TOOLCHAIN.EDITION}", &toolchain.edition) .replace("{?TOOLCHAIN.CHANNEL}", &toolchain.channel) .replace( "{?TOOLCHAIN.TARGETS}", diff --git a/src/template/template.Cargo.toml b/src/template/template.Cargo.toml index cc56e47..a71e3be 100644 --- a/src/template/template.Cargo.toml +++ b/src/template/template.Cargo.toml @@ -1,7 +1,7 @@ [package] name = "download" version = "0.1.0" -edition = "{?TOOLCHAIN.EDITION}" +edition = "2021" [dependencies] {?CRATES}