1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-31 09:24:31 +03:00

Apply cargo fmt following changes in nightly rustfmt

rustfmt now formats `let … else { … }` expressions
This commit is contained in:
Quentin Gliech
2023-07-03 14:50:59 +02:00
parent 991e18d426
commit 4f8b87fbfe
10 changed files with 47 additions and 16 deletions

View File

@ -78,7 +78,8 @@ impl ProxyProtocolV1Info {
.as_ref()
.windows(2)
.take(108)
.position(|needle| needle == [0x0D, 0x0A]) else {
.position(|needle| needle == [0x0D, 0x0A])
else {
// If not, it might be because we don't have enough bytes
return if buf.remaining() < 108 {
Err(E::NotEnoughBytes)