Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Rust to v1.74.0 #445

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ jobs:
set -euo pipefail

# Install the appropriate version of Rust.
rustup toolchain install 1.73.0 # [ref:rust_1.73.0]
rustup default 1.73.0 # [ref:rust_1.73.0]
rustup toolchain install 1.74.0 # [ref:rust_1.74.0]
rustup default 1.74.0 # [ref:rust_1.74.0]

# Add the targets.
rustup target add x86_64-pc-windows-msvc
Expand Down Expand Up @@ -120,8 +120,8 @@ jobs:
set -euo pipefail

# Install the appropriate version of Rust.
rustup toolchain install 1.73.0 # [ref:rust_1.73.0]
rustup default 1.73.0 # [ref:rust_1.73.0]
rustup toolchain install 1.74.0 # [ref:rust_1.74.0]
rustup default 1.74.0 # [ref:rust_1.74.0]

# Add the targets.
rustup target add x86_64-apple-darwin
Expand Down Expand Up @@ -193,8 +193,8 @@ jobs:
set -euo pipefail

# Install the appropriate version of Rust.
rustup toolchain install 1.73.0 # [ref:rust_1.73.0]
rustup default 1.73.0 # [ref:rust_1.73.0]
rustup toolchain install 1.74.0 # [ref:rust_1.74.0]
rustup default 1.74.0 # [ref:rust_1.74.0]

# Fetch the program version.
VERSION="$(cargo pkgid | cut -d# -f2 | cut -d: -f2)"
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.9.7] - 2023-10-06
## [0.9.7] - 2023-11-17

### Changed
- Some redundant conversions are no longer emitted by the Rust code generator.
Expand Down
3 changes: 1 addition & 2 deletions benchmarks/rust/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ const S64_TEST_VALUES: &[i64] = &[
#[allow(clippy::cast_precision_loss)]
fn benchmark<T: Serialize, U: Deserialize>(message: &T, iterations: usize) -> io::Result<()> {
let message_size = message.size();
let mut buffer = Vec::<u8>::new();
buffer.reserve(message_size);
let mut buffer = Vec::with_capacity(message_size);

println!("Message size: {message_size}");

Expand Down
12 changes: 6 additions & 6 deletions toast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ command_prefix: |
cargo-offline () { cargo --frozen --offline "$@"; }

# Use this wrapper for formatting code or checking that code is formatted. We use a nightly Rust
# version for the `trailing_comma` formatting option [tag:rust_fmt_nightly_2023-10-06]. The
# version for the `trailing_comma` formatting option [tag:rust_fmt_nightly_2023-11-17]. The
# nightly version was chosen as the latest available release with all components present
# according to this page:
# https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu.html
cargo-fmt () { cargo +nightly-2023-10-06 --frozen --offline fmt --all -- "$@"; }
cargo-fmt () { cargo +nightly-2023-11-17 --frozen --offline fmt --all -- "$@"; }
tasks:
install_packages:
description: Install system packages.
Expand Down Expand Up @@ -66,18 +66,18 @@ tasks:
- install_packages
- create_user
command: |
# Install stable Rust [tag:rust_1.73.0].
# Install stable Rust [tag:rust_1.74.0].
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
-y \
--default-toolchain 1.73.0 \
--default-toolchain 1.74.0 \
--profile minimal \
--component clippy

# Add Rust tools to `$PATH`.
. "$HOME/.cargo/env"

# Install nightly Rust [ref:rust_fmt_nightly_2023-10-06].
rustup toolchain install nightly-2023-10-06 --profile minimal --component rustfmt
# Install nightly Rust [ref:rust_fmt_nightly_2023-11-17].
rustup toolchain install nightly-2023-11-17 --profile minimal --component rustfmt

install_tools:
description: Install the tools needed to build and validate the program.
Expand Down