mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
enable items_after_statements lint
This commit is contained in:
parent
5c9967f89c
commit
c51e87ec9a
3 changed files with 23 additions and 20 deletions
|
|
@ -89,6 +89,12 @@ impl Error {
|
|||
}
|
||||
|
||||
pub(crate) fn to_response(&self) -> RumaResponse<UiaaResponse> {
|
||||
use ErrorKind::{
|
||||
Forbidden, GuestAccessForbidden, LimitExceeded, MissingToken, NotFound,
|
||||
ThreepidAuthFailed, ThreepidDenied, TooLarge, Unauthorized, Unknown, UnknownToken,
|
||||
Unrecognized, UserDeactivated, WrongRoomKeysVersion,
|
||||
};
|
||||
|
||||
if let Self::Uiaa(uiaainfo) = self {
|
||||
return RumaResponse(UiaaResponse::AuthResponse(uiaainfo.clone()));
|
||||
}
|
||||
|
|
@ -104,11 +110,6 @@ impl Error {
|
|||
|
||||
let message = format!("{self}");
|
||||
|
||||
use ErrorKind::{
|
||||
Forbidden, GuestAccessForbidden, LimitExceeded, MissingToken, NotFound,
|
||||
ThreepidAuthFailed, ThreepidDenied, TooLarge, Unauthorized, Unknown, UnknownToken,
|
||||
Unrecognized, UserDeactivated, WrongRoomKeysVersion,
|
||||
};
|
||||
let (kind, status_code) = match self {
|
||||
Self::BadRequest(kind, _) => (
|
||||
kind.clone(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue