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 - name: Install toolchain
run: | run: |
rustup toolchain install 1.81.0 rustup toolchain install 1.82.0
rustup default 1.81.0 rustup default 1.82.0
rustup component add clippy rustup component add clippy
- name: Setup OPA - name: Setup OPA

View File

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

View File

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

View File

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

View File

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