Skip to content

Commit e32454b

Browse files
committed
Upgrade to Rust 1.82.0
1 parent 7e3a2cb commit e32454b

File tree

5 files changed

+13
-31
lines changed

5 files changed

+13
-31
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ jobs:
195195

196196
- name: Install toolchain
197197
run: |
198-
rustup toolchain install 1.81.0
199-
rustup default 1.81.0
198+
rustup toolchain install 1.82.0
199+
rustup default 1.82.0
200200
rustup component add clippy
201201
202202
- name: Setup OPA

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# The Debian version and version name must be in sync
99
ARG DEBIAN_VERSION=12
1010
ARG DEBIAN_VERSION_NAME=bookworm
11-
ARG RUSTC_VERSION=1.81.0
11+
ARG RUSTC_VERSION=1.82.0
1212
ARG NODEJS_VERSION=20.15.0
1313
ARG OPA_VERSION=0.64.1
1414
ARG CARGO_AUDITABLE_VERSION=0.6.4

crates/handlers/src/admin/call_context.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,8 @@ where
123123
parts: &mut axum::http::request::Parts,
124124
state: &S,
125125
) -> Result<Self, Self::Rejection> {
126-
let activity_tracker = BoundActivityTracker::from_request_parts(parts, state).await;
127-
let activity_tracker = match activity_tracker {
128-
Ok(t) => t,
129-
Err(e) => match e {},
130-
};
131-
132-
let clock = BoxClock::from_request_parts(parts, state).await;
133-
let clock = match clock {
134-
Ok(c) => c,
135-
Err(e) => match e {},
136-
};
126+
let Ok(activity_tracker) = BoundActivityTracker::from_request_parts(parts, state).await;
127+
let Ok(clock) = BoxClock::from_request_parts(parts, state).await;
137128

138129
// Load the database repository
139130
let mut repo = BoxRepository::from_request_parts(parts, state)

crates/handlers/src/test_utils.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -264,14 +264,8 @@ impl TestState {
264264
.with_state(self.clone())
265265
.into_service();
266266

267-
// Both unwrap are on Infallible, so this is safe
268-
let response = app
269-
.ready_oneshot()
270-
.await
271-
.unwrap()
272-
.call(request)
273-
.await
274-
.unwrap();
267+
let Ok(mut service) = app.ready_oneshot().await;
268+
let Ok(response) = service.call(request).await;
275269

276270
let (parts, body) = response.into_parts();
277271

crates/listener/src/proxy_protocol/maybe.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,12 @@ impl MaybeProxyAcceptor {
5555
where
5656
T: AsyncRead + Unpin,
5757
{
58-
match &self.acceptor {
59-
Some(acceptor) => {
60-
let (info, stream) = acceptor.accept(stream).await?;
61-
Ok((Some(info), stream))
62-
}
63-
None => {
64-
let stream = Rewind::new(stream);
65-
Ok((None, stream))
66-
}
58+
if let Some(acceptor) = self.acceptor {
59+
let (info, stream) = acceptor.accept(stream).await?;
60+
Ok((Some(info), stream))
61+
} else {
62+
let stream = Rewind::new(stream);
63+
Ok((None, stream))
6764
}
6865
}
6966
}

0 commit comments

Comments
 (0)