LibURL: Make URL::serialized_host() infallible

This can no longer fail, so update the return type to match.

This makes a few more methods now unable to return errors, but one thing
at a time. 😅
This commit is contained in:
Sam Atkins 2024-11-28 14:32:07 +00:00 committed by Andreas Kling
commit 900c131178
Notes: github-actions[bot] 2024-11-30 11:23:28 +00:00
13 changed files with 47 additions and 51 deletions

View file

@ -55,7 +55,7 @@ ErrorOr<ByteBuffer> HttpRequest::to_raw_request() const
TRY(builder.try_append(*m_url.query()));
}
TRY(builder.try_append(" HTTP/1.1\r\nHost: "sv));
TRY(builder.try_append(TRY(m_url.serialized_host())));
TRY(builder.try_append(m_url.serialized_host()));
if (m_url.port().has_value())
TRY(builder.try_appendff(":{}", *m_url.port()));
TRY(builder.try_append("\r\n"sv));