enable items_after_statements lint

This commit is contained in:
Charles Hall 2024-05-14 17:14:43 -07:00
parent 5c9967f89c
commit c51e87ec9a
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
3 changed files with 23 additions and 20 deletions

View file

@ -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(),