LibCore: Use fallible versions of StringBuilder::append in MimeData

This commit is contained in:
Karol Baraniecki 2023-03-07 14:33:39 +01:00 committed by Linus Groh
parent 68d3f348d9
commit f8e94f2862
Notes: sideshowbarker 2024-07-17 00:27:16 +09:00

View file

@ -35,8 +35,8 @@ ErrorOr<void> MimeData::set_urls(Vector<URL> const& urls)
{
StringBuilder builder;
for (auto& url : urls) {
builder.append(url.to_deprecated_string());
builder.append('\n');
TRY(builder.try_append(url.to_deprecated_string()));
TRY(builder.try_append('\n'));
}
set_data("text/uri-list", TRY(builder.try_to_byte_buffer()));