From bb9dc81ec5d08fe7eeefbd0d4e00906578cb51d2 Mon Sep 17 00:00:00 2001 From: Stephan Boyer Date: Thu, 9 Jul 2026 16:20:31 -0700 Subject: [PATCH 1/2] Update Rust --- .github/workflows/ci.yml | 12 ++++++------ toast.yml | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5347a13..5616cca5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,8 +90,8 @@ jobs: # https://github.com/rust-lang/rustup/issues/2441 # # for more information. - rustup toolchain install 1.96.1 --no-self-update # [ref:rust_1.96.1] - rustup default 1.96.1 # [ref:rust_1.96.1] + rustup toolchain install 1.97.0 --no-self-update # [ref:rust_1.97.0] + rustup default 1.97.0 # [ref:rust_1.97.0] # Add the targets. rustup target add x86_64-pc-windows-msvc @@ -131,8 +131,8 @@ jobs: set -euxo pipefail # Install the appropriate version of Rust. - rustup toolchain install 1.96.1 # [ref:rust_1.96.1] - rustup default 1.96.1 # [ref:rust_1.96.1] + rustup toolchain install 1.97.0 # [ref:rust_1.97.0] + rustup default 1.97.0 # [ref:rust_1.97.0] # Add the targets. rustup target add x86_64-apple-darwin @@ -211,8 +211,8 @@ jobs: set -euxo pipefail # Install the appropriate version of Rust. - rustup toolchain install 1.96.1 # [ref:rust_1.96.1] - rustup default 1.96.1 # [ref:rust_1.96.1] + rustup toolchain install 1.97.0 # [ref:rust_1.97.0] + rustup default 1.97.0 # [ref:rust_1.97.0] # Fetch the program version. VERSION="$(cargo pkgid | cut -d# -f2 | cut -d: -f2)" diff --git a/toast.yml b/toast.yml index 37155486..ec31804d 100644 --- a/toast.yml +++ b/toast.yml @@ -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_2026-07-08]. The + # version for the `trailing_comma` formatting option [tag:rust_fmt_nightly_2026-07-09]. 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-2026-07-08 --frozen --offline fmt --all -- "$@"; } + cargo-fmt () { cargo +nightly-2026-07-09 --frozen --offline fmt --all -- "$@"; } # Load the NVM startup file, if it exists. if [ -f "$HOME/.nvm/nvm.sh" ]; then @@ -75,18 +75,18 @@ tasks: - install_packages - create_user command: | - # Install stable Rust [tag:rust_1.96.1]. + # Install stable Rust [tag:rust_1.97.0]. curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \ -y \ - --default-toolchain 1.96.1 \ + --default-toolchain 1.97.0 \ --profile minimal \ --component clippy # Add Rust tools to `$PATH`. . "$HOME/.cargo/env" - # Install nightly Rust [ref:rust_fmt_nightly_2026-07-08]. - rustup toolchain install nightly-2026-07-08 --profile minimal --component rustfmt + # Install nightly Rust [ref:rust_fmt_nightly_2026-07-09]. + rustup toolchain install nightly-2026-07-09 --profile minimal --component rustfmt install_node: description: Install Node.js, a JavaScript runtime environment. From 7fcec73ac98cae0c0bf836aa1744f2c989be9ae8 Mon Sep 17 00:00:00 2001 From: Stephan Boyer Date: Thu, 9 Jul 2026 16:24:02 -0700 Subject: [PATCH 2/2] Fix Rust 1.97 clippy lints --- src/error.rs | 2 +- src/tokenizer.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/error.rs b/src/error.rs index 3cd7a460..54b59a7e 100644 --- a/src/error.rs +++ b/src/error.rs @@ -169,7 +169,7 @@ pub fn listing(source_contents: &str, source_range: SourceRange) -> String { .blue() .bold(), &line[..*section_start], - &line[*section_start..*section_end].red(), + line[*section_start..*section_end].red(), &line[*section_end..], if colorized { String::new() diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 2ba971e2..5d1e7882 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -235,7 +235,7 @@ pub fn tokenize(schema_path: &Path, schema_contents: &str) -> Result, errors.push(throw::( &format!( "Integer {} must be less than 2^64.", - &schema_contents[i..end].code_str(), + schema_contents[i..end].code_str(), ), Some(schema_path), Some(&listing(schema_contents, SourceRange { start: i, end })), @@ -368,7 +368,7 @@ pub fn tokenize(schema_path: &Path, schema_contents: &str) -> Result, // Now that we've computed the grapheme cluster, construct and report the error. errors.push(throw::( - &format!("Unexpected symbol {}.", &schema_contents[i..end].code_str()), + &format!("Unexpected symbol {}.", schema_contents[i..end].code_str()), Some(schema_path), Some(&listing(schema_contents, SourceRange { start: i, end: i })), None,