Skip to content

Commit f781982

Browse files
authored
update to rust 1.85 to support 2024 edition (#165)
cargo added some whitespace to the output, so there is a little more trimming to reduce the noice in the expected test output.
1 parent 4bf5ede commit f781982

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# always build this using the latest stable release
2-
FROM rust:1.80.0 AS build-base
2+
FROM rust:1.85.0 AS build-base
33

44
ARG JQ_VERSION=1.6
55
ARG JQ_URL=https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux64
@@ -48,7 +48,7 @@ RUN cargo generate-lockfile && cargo local-registry --sync Cargo.lock .
4848
# version tag with a nightly one, pinned to a specific date.
4949

5050
# official Dockerfile source:
51-
# https://github.com/rust-lang/docker-rust/blob/master/1.80.0/bookworm/slim/Dockerfile
51+
# https://github.com/rust-lang/docker-rust/blob/master/stable/bookworm/slim/Dockerfile
5252

5353
################ start-copy-pasta ################
5454

@@ -57,7 +57,7 @@ FROM debian:bookworm-slim
5757
ENV RUSTUP_HOME=/usr/local/rustup \
5858
CARGO_HOME=/usr/local/cargo \
5959
PATH=/usr/local/cargo/bin:$PATH \
60-
RUST_VERSION=nightly-2024-08-02
60+
RUST_VERSION=nightly-2025-02-20
6161
# ~~~~~~~~^~~~~~~~~~
6262
# pin version here
6363

bin/run-tests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -eo pipefail
33

44
# Synopsis:
5-
# Test the test runner by running it against a predefined set of solutions
5+
# Test the test runner by running it against a predefined set of solutions
66
# with an expected output.
77

88
# Output:

src/output.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ impl TestResult {
3333
pub fn fail(name: String, test_code: String, message: Option<String>) -> TestResult {
3434
let name = format_test_name(name);
3535

36-
let (output, message) = match message.as_ref().and_then(|m| m.split_once("thread '")) {
36+
let (output, message) = match message.as_ref().and_then(|m| m.split_once("\nthread '")) {
3737
Some((output, message)) if !output.is_empty() => {
3838
(Some(output.to_owned()), Some(format!("thread '{message}")))
3939
}
40-
_ => (None, message),
40+
_ => (None, message.map(|m| m.trim_start().to_owned())),
4141
};
4242

4343
// This note is attached to the error message of only one test case that fails,

0 commit comments

Comments
 (0)