mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-30 23:12:56 +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
|
@ -97,7 +97,7 @@ ErrorOr<DataURL> process_data_url(URL::URL const& data_url)
|
|||
}
|
||||
|
||||
// 13. Let mimeTypeRecord be the result of parsing mimeType.
|
||||
auto mime_type_record = TRY(MimeSniff::MimeType::parse(mime_type));
|
||||
auto mime_type_record = MimeSniff::MimeType::parse(mime_type);
|
||||
|
||||
// 14. If mimeTypeRecord is failure, then set mimeTypeRecord to text/plain;charset=US-ASCII.
|
||||
if (!mime_type_record.has_value()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue