Skip to content

Commit

Permalink
Merge pull request #440 from gramlang/rust-v1.83.0
Browse files Browse the repository at this point in the history
Update Rust to v1.83.0
  • Loading branch information
stepchowfun authored Nov 28, 2024
2 parents 9de8413 + cd01ae2 commit 970cbd0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ jobs:
# https://github.com/rust-lang/rustup/issues/2441
#
# for more information.
rustup toolchain install 1.81.0 --no-self-update # [ref:rust_1.81.0]
rustup default 1.81.0 # [ref:rust_1.81.0]
rustup toolchain install 1.83.0 --no-self-update # [ref:rust_1.83.0]
rustup default 1.83.0 # [ref:rust_1.83.0]
# Add the targets.
rustup target add x86_64-pc-windows-msvc
Expand Down Expand Up @@ -124,8 +124,8 @@ jobs:
set -euxo pipefail
# Install the appropriate version of Rust.
rustup toolchain install 1.81.0 # [ref:rust_1.81.0]
rustup default 1.81.0 # [ref:rust_1.81.0]
rustup toolchain install 1.83.0 # [ref:rust_1.83.0]
rustup default 1.83.0 # [ref:rust_1.83.0]
# Add the targets.
rustup target add x86_64-apple-darwin
Expand Down Expand Up @@ -198,8 +198,8 @@ jobs:
set -euxo pipefail
# Install the appropriate version of Rust.
rustup toolchain install 1.81.0 # [ref:rust_1.81.0]
rustup default 1.81.0 # [ref:rust_1.81.0]
rustup toolchain install 1.83.0 # [ref:rust_1.83.0]
rustup default 1.83.0 # [ref:rust_1.83.0]
# Fetch the program version.
VERSION="$(cargo pkgid | cut -d# -f2 | cut -d: -f2)"
Expand Down
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl fmt::Display for Error {
}

impl error::Error for Error {
fn source<'a>(&'a self) -> Option<&(dyn error::Error + 'static)> {
fn source<'a>(&'a self) -> Option<&'a (dyn error::Error + 'static)> {
self.reason.as_deref()
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/term.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ pub enum Variant<'a> {
If(Rc<Term<'a>>, Rc<Term<'a>>, Rc<Term<'a>>),
}

impl<'a> Display for Term<'a> {
impl Display for Term<'_> {
fn fmt(&self, f: &mut Formatter) -> std::fmt::Result {
write!(f, "{}", self.variant)?;
Ok(())
}
}

impl<'a> Display for Variant<'a> {
impl Display for Variant<'_> {
fn fmt(&self, f: &mut Formatter) -> std::fmt::Result {
match self {
Self::Unifier(subterm_rc, _) => {
Expand Down
4 changes: 2 additions & 2 deletions src/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ pub enum TerminatorType {
Semicolon,
}

impl<'a> Display for Token<'a> {
impl Display for Token<'_> {
fn fmt(&self, f: &mut Formatter) -> Result {
write!(f, "{}", self.variant)
}
}

impl<'a> Display for Variant<'a> {
impl Display for Variant<'_> {
fn fmt(&self, f: &mut Formatter) -> Result {
match self {
Self::Asterisk => write!(f, "*"),
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_2024-09-06]. The
# version for the `trailing_comma` formatting option [tag:rust_fmt_nightly_2024-11-28]. 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-2024-09-06 --frozen --offline fmt --all -- "$@"; }
cargo-fmt () { cargo +nightly-2024-11-28 --frozen --offline fmt --all -- "$@"; }
# Make Bash log commands.
set -x
Expand Down Expand Up @@ -71,18 +71,18 @@ tasks:
- install_packages
- create_user
command: |
# Install stable Rust [tag:rust_1.81.0].
# Install stable Rust [tag:rust_1.83.0].
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
-y \
--default-toolchain 1.81.0 \
--default-toolchain 1.83.0 \
--profile minimal \
--component clippy
# Add Rust tools to `$PATH`.
. "$HOME/.cargo/env"
# Install nightly Rust [ref:rust_fmt_nightly_2024-09-06].
rustup toolchain install nightly-2024-09-06 --profile minimal --component rustfmt
# Install nightly Rust [ref:rust_fmt_nightly_2024-11-28].
rustup toolchain install nightly-2024-11-28 --profile minimal --component rustfmt
install_tools:
description: Install the tools needed to build and validate the program.
Expand Down

0 comments on commit 970cbd0

Please sign in to comment.