Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend.Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
6 changes: 3 additions & 3 deletions crates/crates_io_worker/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<F, R, E, Fut>(
transaction_name: &str,
Expand Down Expand Up @@ -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::<PanicInfo<'_>>() {
if let Some(x) = info.downcast_ref::<PanicHookInfo<'_>>() {
anyhow!("job panicked: {x}")
} else if let Some(x) = info.downcast_ref::<&'static str>() {
anyhow!("job panicked: {x}")
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.81.0"
channel = "1.82.0"
7 changes: 3 additions & 4 deletions src/middleware/static_or_continue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ async fn serve<P: AsRef<Path>>(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);
}
}

Expand Down
Loading