accept suggestion for actix-files/src/named.rs

Co-authored-by: Yuki Okushi <jtitor@2k36.org>
This commit is contained in:
kkocdko 2022-10-07 18:49:20 +08:00 committed by GitHub
parent 9e94de0d72
commit 85b8b1f0af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -132,8 +132,7 @@ impl NamedFile {
mime::IMAGE | mime::TEXT | mime::AUDIO | mime::VIDEO => DispositionType::Inline,
mime::APPLICATION => match ct.subtype() {
mime::JAVASCRIPT | mime::JSON => DispositionType::Inline,
name if name == "wasm" => DispositionType::Inline,
name if name == "xhtml" => DispositionType::Inline,
name if name == "wasm" || name == "xhtml" => DispositionType::Inline,
_ => DispositionType::Attachment,
},
_ => DispositionType::Attachment,