Skip to content

Commit c3f9ae1

Browse files
authored
Merge pull request #322 from stepchowfun/rust-v1.83.0
Update Rust to v1.83.0
2 parents 6800e22 + e39bccb commit c3f9ae1

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ jobs:
9090
# https://github.com/rust-lang/rustup/issues/2441
9191
#
9292
# for more information.
93-
rustup toolchain install 1.81.0 --no-self-update # [ref:rust_1.81.0]
94-
rustup default 1.81.0 # [ref:rust_1.81.0]
93+
rustup toolchain install 1.83.0 --no-self-update # [ref:rust_1.83.0]
94+
rustup default 1.83.0 # [ref:rust_1.83.0]
9595
9696
# Add the targets.
9797
rustup target add x86_64-pc-windows-msvc
@@ -131,8 +131,8 @@ jobs:
131131
set -euxo pipefail
132132
133133
# Install the appropriate version of Rust.
134-
rustup toolchain install 1.81.0 # [ref:rust_1.81.0]
135-
rustup default 1.81.0 # [ref:rust_1.81.0]
134+
rustup toolchain install 1.83.0 # [ref:rust_1.83.0]
135+
rustup default 1.83.0 # [ref:rust_1.83.0]
136136
137137
# Add the targets.
138138
rustup target add x86_64-apple-darwin
@@ -211,8 +211,8 @@ jobs:
211211
set -euxo pipefail
212212
213213
# Install the appropriate version of Rust.
214-
rustup toolchain install 1.81.0 # [ref:rust_1.81.0]
215-
rustup default 1.81.0 # [ref:rust_1.81.0]
214+
rustup toolchain install 1.83.0 # [ref:rust_1.83.0]
215+
rustup default 1.83.0 # [ref:rust_1.83.0]
216216
217217
# Fetch the program version.
218218
VERSION="$(cargo pkgid | cut -d# -f2 | cut -d: -f2)"

src/run.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -626,9 +626,9 @@ fn vacuum(
626626
state: &mut State,
627627
first_run: bool,
628628
threshold: Byte,
629-
keep: &Option<RegexSet>,
629+
keep: Option<&RegexSet>,
630630
deletion_chunk_size: usize,
631-
min_age: &Option<Duration>,
631+
min_age: Option<Duration>,
632632
) -> io::Result<()> {
633633
// Find all images.
634634
let image_records = list_image_records(state)?;
@@ -674,7 +674,7 @@ fn vacuum(
674674
// If the `--min-age` argument is provided, we need to filter out images
675675
// which are newer than the provided duration.
676676
if let Some(duration) = min_age {
677-
match (SystemTime::now() - *duration).duration_since(UNIX_EPOCH) {
677+
match (SystemTime::now() - duration).duration_since(UNIX_EPOCH) {
678678
Ok(time_stamp) => {
679679
sorted_image_nodes.retain(|(image_id, image_node)| {
680680
if image_node.last_used_since_epoch > time_stamp {
@@ -786,9 +786,9 @@ pub fn run(
786786
state,
787787
*first_run,
788788
threshold,
789-
&settings.keep,
789+
settings.keep.as_ref(),
790790
settings.deletion_chunk_size,
791-
&settings.min_age,
791+
settings.min_age,
792792
)?;
793793
state::save(state)?;
794794
*first_run = false;
@@ -865,9 +865,9 @@ pub fn run(
865865
state,
866866
*first_run,
867867
threshold,
868-
&settings.keep,
868+
settings.keep.as_ref(),
869869
settings.deletion_chunk_size,
870-
&settings.min_age,
870+
settings.min_age,
871871
)?;
872872
}
873873

toast.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ command_prefix: |
1717
cargo-offline () { cargo --frozen --offline "$@"; }
1818
1919
# Use this wrapper for formatting code or checking that code is formatted. We use a nightly Rust
20-
# version for the `trailing_comma` formatting option [tag:rust_fmt_nightly_2024-09-06]. The
20+
# version for the `trailing_comma` formatting option [tag:rust_fmt_nightly_2024-11-28]. The
2121
# nightly version was chosen as the latest available release with all components present
2222
# according to this page:
2323
# https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu.html
24-
cargo-fmt () { cargo +nightly-2024-09-06 --frozen --offline fmt --all -- "$@"; }
24+
cargo-fmt () { cargo +nightly-2024-11-28 --frozen --offline fmt --all -- "$@"; }
2525
2626
# Make Bash log commands.
2727
set -x
@@ -92,18 +92,18 @@ tasks:
9292
- install_packages
9393
- create_user
9494
command: |
95-
# Install stable Rust [tag:rust_1.81.0].
95+
# Install stable Rust [tag:rust_1.83.0].
9696
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
9797
-y \
98-
--default-toolchain 1.81.0 \
98+
--default-toolchain 1.83.0 \
9999
--profile minimal \
100100
--component clippy
101101
102102
# Add Rust tools to `$PATH`.
103103
. "$HOME/.cargo/env"
104104
105-
# Install nightly Rust [ref:rust_fmt_nightly_2024-09-06].
106-
rustup toolchain install nightly-2024-09-06 --profile minimal --component rustfmt
105+
# Install nightly Rust [ref:rust_fmt_nightly_2024-11-28].
106+
rustup toolchain install nightly-2024-11-28 --profile minimal --component rustfmt
107107
108108
install_tools:
109109
description: Install the tools needed to build and validate the program.

0 commit comments

Comments
 (0)