mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-05 00:21:52 +00:00
LibWeb: Make MimeSniff::MimeType::parse() infallible
It already returns an empty Optional for failures, so there's no need to wrap it in an ErrorOr as well.
This commit is contained in:
parent
88e7688940
commit
5c20bc2afc
Notes:
github-actions[bot]
2024-10-14 18:48:45 +00:00
Author: https://github.com/awesomekling
Commit: 5c20bc2afc
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1796
15 changed files with 39 additions and 37 deletions
|
@ -186,7 +186,7 @@ Bindings::CanPlayTypeResult HTMLMediaElement::can_play_type(StringView type) con
|
|||
if (type == "application/octet-stream"sv)
|
||||
return Bindings::CanPlayTypeResult::Empty;
|
||||
|
||||
auto mime_type = MUST(MimeSniff::MimeType::parse(type));
|
||||
auto mime_type = MimeSniff::MimeType::parse(type);
|
||||
|
||||
if (mime_type.has_value() && mime_type->type() == "video"sv) {
|
||||
if (mime_type->subtype() == "webm"sv)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue