diff --git a/backend.Dockerfile b/backend.Dockerfile index 51147f9dc57..dad62ad65a5 100644 --- a/backend.Dockerfile +++ b/backend.Dockerfile @@ -1,5 +1,5 @@ # renovate: datasource=github-tags depName=rust lookupName=rust-lang/rust -ARG RUST_VERSION=1.81.0 +ARG RUST_VERSION=1.82.0 FROM rust:$RUST_VERSION diff --git a/crates/crates_io_worker/src/util.rs b/crates/crates_io_worker/src/util.rs index d8e3b7d498d..b960b1fbc8f 100644 --- a/crates/crates_io_worker/src/util.rs +++ b/crates/crates_io_worker/src/util.rs @@ -2,7 +2,7 @@ use anyhow::anyhow; use sentry_core::Hub; use std::any::Any; use std::future::Future; -use std::panic::PanicInfo; +use std::panic::PanicHookInfo; pub async fn with_sentry_transaction( transaction_name: &str, @@ -34,11 +34,11 @@ where /// Try to figure out what's in the box, and print it if we can. /// /// The actual error type we will get from `panic::catch_unwind` is really poorly documented. -/// However, the `panic::set_hook` functions deal with a `PanicInfo` type, and its payload is +/// However, the `panic::set_hook` functions deal with a `PanicHookInfo` type, and its payload is /// documented as "commonly but not always `&'static str` or `String`". So we can try all of those, /// and give up if we didn't get one of those three types. pub fn try_to_extract_panic_info(info: &(dyn Any + Send + 'static)) -> anyhow::Error { - if let Some(x) = info.downcast_ref::>() { + if let Some(x) = info.downcast_ref::>() { anyhow!("job panicked: {x}") } else if let Some(x) = info.downcast_ref::<&'static str>() { anyhow!("job panicked: {x}") diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 1de01fa45c4..2e2b8c8521e 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.81.0" +channel = "1.82.0" diff --git a/src/middleware/static_or_continue.rs b/src/middleware/static_or_continue.rs index 15dca8a694d..10f1075e26e 100644 --- a/src/middleware/static_or_continue.rs +++ b/src/middleware/static_or_continue.rs @@ -25,10 +25,9 @@ async fn serve>(path: P, request: Request, next: Next) -> Respons *static_req.headers_mut() = request.headers().clone(); let serve_dir = ServeDir::new(path).precompressed_br().precompressed_gzip(); - if let Ok(response) = serve_dir.oneshot(static_req).await { - if response.status() != StatusCode::NOT_FOUND { - return response.map(axum::body::Body::new); - } + let Ok(response) = serve_dir.oneshot(static_req).await; + if response.status() != StatusCode::NOT_FOUND { + return response.map(axum::body::Body::new); } }