mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-08 09:24:17 +00:00
clippy
This commit is contained in:
parent
a339d9a6d6
commit
51505b86db
|
@ -5,7 +5,7 @@ CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
|
|||
|
||||
cd $CWD/../
|
||||
|
||||
cargo clippy --workspace --fix --allow-staged --allow-dirty --tests --all-targets --all-features -- -D warnings
|
||||
cargo clippy --workspace --fix --allow-staged --allow-dirty --tests --all-targets -- -D warnings
|
||||
|
||||
# Format rust files
|
||||
cargo +nightly fmt
|
||||
|
|
|
@ -76,7 +76,7 @@ where
|
|||
if let Err(e) = &local_user_view {
|
||||
warn!("Failed to handle user login: {e}");
|
||||
}
|
||||
if let Some(local_user_view) = local_user_view.ok() {
|
||||
if let Ok(local_user_view) = local_user_view {
|
||||
req.extensions_mut().insert(local_user_view);
|
||||
}
|
||||
}
|
||||
|
@ -86,9 +86,8 @@ where
|
|||
// Add cache-control header. If user is authenticated, mark as private. Otherwise cache
|
||||
// up to one minute.
|
||||
|
||||
let cache_value = if jwt.is_some() {
|
||||
"private"
|
||||
} else if context.settings().disable_cache_control.unwrap_or(false) {
|
||||
let disable_cache = context.settings().disable_cache_control.unwrap_or(false);
|
||||
let cache_value = if jwt.is_some() || disable_cache {
|
||||
"private"
|
||||
} else {
|
||||
"public, max-age=60"
|
||||
|
|
Loading…
Reference in a new issue