Skip to content

Commit

Permalink
Deprecated edition field in rust-config.toml as it's kinda pointless
Browse files Browse the repository at this point in the history
  • Loading branch information
AverseABFun committed Dec 27, 2024
1 parent 3525a55 commit 091e25d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion 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
@@ -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."
Expand Down
4 changes: 2 additions & 2 deletions rust-config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[x64_package_linux_rust_pkg_gen]
toolchains = [
{ edition = "2021", channel = "nightly", components = [
{ channel = "nightly", components = [
"rustfmt",
"rustc",
"cargo",
Expand Down Expand Up @@ -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",
Expand Down
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>,
/// The channel of rust to use. Should be in [`targets::RELEASE_CHANNELS`].
pub channel: String,
/// The components of rust to install.
Expand Down
1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
Expand Down
2 changes: 1 addition & 1 deletion src/template/template.Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "download"
version = "0.1.0"
edition = "{?TOOLCHAIN.EDITION}"
edition = "2021"

[dependencies]
{?CRATES}

0 comments on commit 091e25d

Please sign in to comment.