Upgrade to Rust 1.82.0 (#3407)

This commit is contained in:
Quentin Gliech
2024-10-22 17:01:27 +02:00
committed by GitHub
parent d7ad051191
commit ae6995582a
5 changed files with 13 additions and 31 deletions

View File

@@ -195,8 +195,8 @@ jobs:
- name: Install toolchain
run: |
rustup toolchain install 1.81.0
rustup default 1.81.0
rustup toolchain install 1.82.0
rustup default 1.82.0
rustup component add clippy
- name: Setup OPA

View File

@@ -8,7 +8,7 @@
# The Debian version and version name must be in sync
ARG DEBIAN_VERSION=12
ARG DEBIAN_VERSION_NAME=bookworm
ARG RUSTC_VERSION=1.81.0
ARG RUSTC_VERSION=1.82.0
ARG NODEJS_VERSION=20.15.0
ARG OPA_VERSION=0.64.1
ARG CARGO_AUDITABLE_VERSION=0.6.4

View File

@@ -123,17 +123,8 @@ where
parts: &mut axum::http::request::Parts,
state: &S,
) -> Result<Self, Self::Rejection> {
let activity_tracker = BoundActivityTracker::from_request_parts(parts, state).await;
let activity_tracker = match activity_tracker {
Ok(t) => t,
Err(e) => match e {},
};
let clock = BoxClock::from_request_parts(parts, state).await;
let clock = match clock {
Ok(c) => c,
Err(e) => match e {},
};
let Ok(activity_tracker) = BoundActivityTracker::from_request_parts(parts, state).await;
let Ok(clock) = BoxClock::from_request_parts(parts, state).await;
// Load the database repository
let mut repo = BoxRepository::from_request_parts(parts, state)

View File

@@ -264,14 +264,8 @@ impl TestState {
.with_state(self.clone())
.into_service();
// Both unwrap are on Infallible, so this is safe
let response = app
.ready_oneshot()
.await
.unwrap()
.call(request)
.await
.unwrap();
let Ok(mut service) = app.ready_oneshot().await;
let Ok(response) = service.call(request).await;
let (parts, body) = response.into_parts();

View File

@@ -55,15 +55,12 @@ impl MaybeProxyAcceptor {
where
T: AsyncRead + Unpin,
{
match &self.acceptor {
Some(acceptor) => {
let (info, stream) = acceptor.accept(stream).await?;
Ok((Some(info), stream))
}
None => {
let stream = Rewind::new(stream);
Ok((None, stream))
}
if let Some(acceptor) = self.acceptor {
let (info, stream) = acceptor.accept(stream).await?;
Ok((Some(info), stream))
} else {
let stream = Rewind::new(stream);
Ok((None, stream))
}
}
}