mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-26 09:35:46 +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:
committed by
Andreas Kling
parent
88e7688940
commit
5c20bc2afc
@@ -235,7 +235,7 @@ FileFilter HTMLInputElement::parse_accept_attribute() const
|
||||
|
||||
// A valid MIME type string with no parameters
|
||||
// Indicates that files of the specified type are accepted.
|
||||
else if (auto mime_type = MUST(MimeSniff::MimeType::parse(value)); mime_type.has_value() && mime_type->parameters().is_empty())
|
||||
else if (auto mime_type = MimeSniff::MimeType::parse(value); mime_type.has_value() && mime_type->parameters().is_empty())
|
||||
filter.add_filter(FileFilter::MimeType { mime_type->essence() });
|
||||
|
||||
// A string whose first character is a U+002E FULL STOP character (.)
|
||||
|
||||
Reference in New Issue
Block a user