style: apply clippy lints

This commit is contained in:
daimond113 2024-11-26 12:25:31 +01:00
parent 80c47aa0e4
commit 15d6655889
No known key found for this signature in database
GPG key ID: 3A8ECE51328B513C
2 changed files with 3 additions and 7 deletions

View file

@ -184,14 +184,10 @@ pub fn get_auth_from_env(config: &IndexConfig) -> Auth {
}
pub fn get_token_from_req(req: &ServiceRequest) -> Option<String> {
let token = match req
let token = req
.headers()
.get(AUTHORIZATION)
.and_then(|token| token.to_str().ok())
{
Some(token) => token,
None => return None,
};
.and_then(|token| token.to_str().ok())?;
let token = if token.to_lowercase().starts_with("bearer ") {
token[7..].to_string()

View file

@ -230,7 +230,7 @@ info: otherwise, the file was deemed unnecessary, if you don't understand why, p
);
}
if roblox_target.as_mut().map_or(false, |build_files| {
if roblox_target.as_mut().is_some_and(|build_files| {
build_files.insert(first_part.to_string())
}) {
println!(