mirror of
https://github.com/pesde-pkg/pesde.git
synced 2025-04-10 22:00:55 +01: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> {
|
pub fn get_token_from_req(req: &ServiceRequest) -> Option<String> {
|
||||||
let token = match req
|
let token = req
|
||||||
.headers()
|
.headers()
|
||||||
.get(AUTHORIZATION)
|
.get(AUTHORIZATION)
|
||||||
.and_then(|token| token.to_str().ok())
|
.and_then(|token| token.to_str().ok())?;
|
||||||
{
|
|
||||||
Some(token) => token,
|
|
||||||
None => return None,
|
|
||||||
};
|
|
||||||
|
|
||||||
let token = if token.to_lowercase().starts_with("bearer ") {
|
let token = if token.to_lowercase().starts_with("bearer ") {
|
||||||
token[7..].to_string()
|
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())
|
build_files.insert(first_part.to_string())
|
||||||
}) {
|
}) {
|
||||||
println!(
|
println!(
|
||||||
|
|
Loading…
Add table
Reference in a new issue