From 39a1aa55c6f0b5b69daa6636b28bc72988acb481 Mon Sep 17 00:00:00 2001 From: JR Conlin Date: Fri, 13 Sep 2024 03:14:53 +0000 Subject: [PATCH] chore: Updates for rust 1.81 (#766) --- .circleci/config.yml | 4 ++-- Dockerfile | 2 +- .../autoconnect-ws/autoconnect-ws-sm/src/identified/mod.rs | 2 +- autoendpoint/src/extractors/subscription.rs | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 57fbf81bc..85154f4c9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -53,7 +53,7 @@ commands: apt install build-essential curl libstdc++6 libstdc++-12-dev libssl-dev pkg-config -y apt install cmake -y # RUST_VER - curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.80 -y + curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.81 -y export PATH=$PATH:$HOME/.cargo/bin echo 'export PATH=$PATH:$HOME/.cargo/bin' >> $BASH_ENV rustc --version @@ -113,7 +113,7 @@ jobs: audit: docker: # NOTE: update version for all # RUST_VER - - image: rust:1.80 + - image: rust:1.81 auth: username: $DOCKER_USER password: $DOCKER_PASS diff --git a/Dockerfile b/Dockerfile index 55264aa5c..21e3ffa93 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # NOTE: Ensure builder's Rust version matches CI's in .circleci/config.yml # RUST_VER -FROM rust:1.80-bookworm AS builder +FROM rust:1.81-bookworm AS builder ARG CRATE ADD . /app diff --git a/autoconnect/autoconnect-ws/autoconnect-ws-sm/src/identified/mod.rs b/autoconnect/autoconnect-ws/autoconnect-ws-sm/src/identified/mod.rs index dbae5ff23..bd91b76a0 100644 --- a/autoconnect/autoconnect-ws/autoconnect-ws-sm/src/identified/mod.rs +++ b/autoconnect/autoconnect-ws/autoconnect-ws-sm/src/identified/mod.rs @@ -245,7 +245,7 @@ impl WebPushClient { if let Some(node_id) = user.node_id { app_state .http - .put(&format!("{}/notif/{}", node_id, uaid.as_simple())) + .put(format!("{}/notif/{}", node_id, uaid.as_simple())) .send() .await? .error_for_status()?; diff --git a/autoendpoint/src/extractors/subscription.rs b/autoendpoint/src/extractors/subscription.rs index f2043bb6f..74bfb0341 100644 --- a/autoendpoint/src/extractors/subscription.rs +++ b/autoendpoint/src/extractors/subscription.rs @@ -157,12 +157,11 @@ fn parse_vapid(token_info: &TokenInfo, metrics: &StatsdClient) -> ApiResult return Ok(None), }; - let vapid = VapidHeader::parse(auth_header).map_err(|e| { + let vapid = VapidHeader::parse(auth_header).inspect_err(|e| { metrics .incr_with_tags("notification.auth.error") .with_tag("error", e.as_metric()) .send(); - e })?; metrics