mirror of
https://github.com/pesde-pkg/pesde.git
synced 2024-12-12 02:50:37 +00:00
style: apply clippy lints
This commit is contained in:
parent
80c47aa0e4
commit
15d6655889
2 changed files with 3 additions and 7 deletions
|
@ -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()
|
||||
|
|
|
@ -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!(
|
||||
|
|
Loading…
Reference in a new issue