Skip to content

Commit a72cc2b

Browse files
committed
format
1 parent fd226f7 commit a72cc2b

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

src/error.rs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,7 @@ pub(super) enum User {
132132
))]
133133
BodyWriteAborted,
134134
/// User tried to send a connect request with a nonzero body
135-
#[cfg(all(
136-
any(feature = "client", feature = "server"),
137-
feature = "http2"
138-
))]
135+
#[cfg(all(any(feature = "client", feature = "server"), feature = "http2"))]
139136
InvalidConnectWithBody,
140137
/// Error from future of user's Service.
141138
#[cfg(any(
@@ -401,7 +398,7 @@ impl Error {
401398
Error::new_user(User::Body).with(cause)
402399
}
403400

404-
#[cfg(all( any(feature = "client", feature = "server"), feature = "http2"))]
401+
#[cfg(all(any(feature = "client", feature = "server"), feature = "http2"))]
405402
pub(super) fn new_user_invalid_connect() -> Error {
406403
Error::new_user(User::InvalidConnectWithBody)
407404
}
@@ -507,11 +504,10 @@ impl Error {
507504
all(any(feature = "client", feature = "server"), feature = "http1"),
508505
all(feature = "server", feature = "http2")
509506
))]
510-
#[cfg(all(
511-
any(feature = "client", feature = "server"),
512-
feature = "http2"
513-
))]
514-
Kind::User(User::InvalidConnectWithBody) => "user sent CONNECT request with non-zero body",
507+
#[cfg(all(any(feature = "client", feature = "server"), feature = "http2"))]
508+
Kind::User(User::InvalidConnectWithBody) => {
509+
"user sent CONNECT request with non-zero body"
510+
}
515511
Kind::User(User::Service) => "error from user's Service",
516512
#[cfg(any(feature = "http1", feature = "http2"))]
517513
#[cfg(feature = "server")]

src/proto/h2/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ where
676676
debug!("h2 connect request with non-zero body not supported");
677677
cb.send(Err(TrySendError {
678678
error: crate::Error::new_user_invalid_connect(),
679-
message: None
679+
message: None,
680680
}));
681681
continue;
682682
}

0 commit comments

Comments
 (0)