1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2025-06-27 16:35:59 +00:00

fix cargo clippy lints

This commit is contained in:
Charles Hall 2023-12-23 19:48:14 -08:00
parent 92c5b6b86c
commit ab1fff2642
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
31 changed files with 205 additions and 205 deletions

View file

@ -117,12 +117,10 @@ pub async fn login_route(body: Ruma<login::v3::Request>) -> Result<login::v3::Re
} else {
return Err(Error::BadRequest(ErrorKind::Forbidden, "Bad login type."));
};
let user_id =
UserId::parse_with_server_name(username, services().globals.server_name())
.map_err(|_| {
Error::BadRequest(ErrorKind::InvalidUsername, "Username is invalid.")
})?;
user_id
UserId::parse_with_server_name(username, services().globals.server_name()).map_err(
|_| Error::BadRequest(ErrorKind::InvalidUsername, "Username is invalid."),
)?
}
_ => {
warn!("Unsupported or unknown login type: {:?}", &body.login_info);