mirror of https://github.com/LemmyNet/lemmy.git
Adding clippy:unwrap to husky. Fixes #1892
parent
8a108bccae
commit
11dab9c6f5
|
@ -5,6 +5,8 @@ cargo +nightly fmt -- --check
|
|||
|
||||
cargo clippy --workspace --tests --all-targets --all-features -- \
|
||||
-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
|
||||
git add config/defaults.hjson
|
||||
|
|
|
@ -69,7 +69,10 @@ impl Guard for InboxRequestGuard {
|
|||
return false;
|
||||
}
|
||||
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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue