From b4d515996e07f64e434543025b0edc03096f3093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Miguel?= <36349314+vrmiguel@users.noreply.github.com> Date: Tue, 24 Sep 2024 16:39:33 -0300 Subject: [PATCH] Dockerfile: bump Rust to 1.81 (#767) --- cli/src/control_file.rs | 4 ++-- registry/Dockerfile | 2 +- registry/src/v1/extractor.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/src/control_file.rs b/cli/src/control_file.rs index 9e35876f..82db0f51 100644 --- a/cli/src/control_file.rs +++ b/cli/src/control_file.rs @@ -55,8 +55,8 @@ impl ControlFile { } } -fn strip_value(input: &str) -> &str { - let stripped = input.trim_start_matches(|ch| matches!(ch, ' ' | '=')); +pub fn strip_value(input: &str) -> &str { + let stripped = input.trim_start_matches([' ', '=']); let trimmed = stripped.trim_start(); trimmed.trim_matches('\'') diff --git a/registry/Dockerfile b/registry/Dockerfile index bde37f3e..01d2ac6e 100644 --- a/registry/Dockerfile +++ b/registry/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/tembo/rust:1.76-bookworm as builder +FROM quay.io/tembo/rust:1.81-bookworm as builder COPY .sqlx .sqlx COPY Cargo.toml Cargo.lock ./ COPY src ./src diff --git a/registry/src/v1/extractor.rs b/registry/src/v1/extractor.rs index eb7033d0..03930582 100644 --- a/registry/src/v1/extractor.rs +++ b/registry/src/v1/extractor.rs @@ -164,7 +164,7 @@ fn parse_control_file(extension_name: String, control_file: String) -> ControlFi let mut default_version = None; fn strip_value(input: &str) -> &str { - let stripped = input.trim_start_matches(|ch| matches!(ch, ' ' | '=')); + let stripped = input.trim_start_matches([' ', '=']); let trimmed = stripped.trim_start(); trimmed.trim_matches('\'')