mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-29 15:51:20 +00:00
parent
8a108bccae
commit
8d4c4fdf6c
2 changed files with 6 additions and 1 deletions
|
@ -5,6 +5,8 @@ cargo +nightly fmt -- --check
|
||||||
|
|
||||||
cargo clippy --workspace --tests --all-targets --all-features -- \
|
cargo clippy --workspace --tests --all-targets --all-features -- \
|
||||||
-D warnings -D deprecated -D clippy::perf -D clippy::complexity -D clippy::dbg_macro
|
-D warnings -D deprecated -D clippy::perf -D clippy::complexity -D clippy::dbg_macro
|
||||||
|
cargo clippy --workspace -- \
|
||||||
|
-D clippy::unwrap_used
|
||||||
|
|
||||||
./scripts/update_config_defaults.sh
|
./scripts/update_config_defaults.sh
|
||||||
git add config/defaults.hjson
|
git add config/defaults.hjson
|
||||||
|
|
|
@ -69,7 +69,10 @@ impl Guard for InboxRequestGuard {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if let Some(val) = request.headers.get("Content-Type") {
|
if let Some(val) = request.headers.get("Content-Type") {
|
||||||
return val.to_str().unwrap().starts_with("application/");
|
return val
|
||||||
|
.to_str()
|
||||||
|
.expect("Content-Type header contains non-ascii chars.")
|
||||||
|
.starts_with("application/");
|
||||||
}
|
}
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue