cargo clippy --fix
This commit is contained in:
parent
857832e052
commit
351c173357
2 changed files with 2 additions and 3 deletions
|
@ -75,8 +75,7 @@ pub fn i18n_filter(
|
|||
|
||||
let langs = args
|
||||
.get("lang")
|
||||
.map(|value| value.as_array())
|
||||
.flatten()
|
||||
.and_then(|value| value.as_array())
|
||||
.map(|array| {
|
||||
let mut langs = Vec::with_capacity(array.len());
|
||||
for lang in array {
|
||||
|
|
|
@ -25,7 +25,7 @@ pub async fn get_challenge(
|
|||
lang: cookies
|
||||
.get(LANG_COOKIE)
|
||||
.map(|cookie| vec![cookie.value().to_owned()])
|
||||
.or_else(|| accept_language.0)
|
||||
.or(accept_language.0)
|
||||
.unwrap_or_else(|| vec![DEFAULT_LANG.to_owned()]),
|
||||
user: User::get(cookies).await.unwrap(),
|
||||
content: Challenge::get(challenge),
|
||||
|
|
Loading…
Add table
Reference in a new issue