resolve some pedantic lints, reduce some allocations

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-03-08 11:48:52 -05:00 committed by June
parent 507baf20fa
commit 496a9c7af8
12 changed files with 72 additions and 72 deletions

View file

@ -10,6 +10,10 @@ use ruma::{
};
use thiserror::Error;
use tracing::{error, info};
use ErrorKind::{
Forbidden, GuestAccessForbidden, LimitExceeded, MissingToken, NotFound, ThreepidAuthFailed, ThreepidDenied,
TooLarge, Unauthorized, Unknown, UnknownToken, Unrecognized, UserDeactivated, WrongRoomKeysVersion,
};
use crate::RumaResponse;
@ -105,10 +109,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(),