1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 17:05:06 +00:00

Userland: Don't use String::from_utf8() for literal strings

This commit is contained in:
Tim Ledbetter 2023-09-14 17:57:11 +01:00 committed by Andreas Kling
parent 4cc3c41269
commit c74f7e5f2a
8 changed files with 15 additions and 15 deletions

View file

@ -423,7 +423,7 @@ ErrorOr<void> MainWidget::create_models()
auto unicode_blocks = Unicode::block_display_names();
TRY(m_unicode_block_list.try_ensure_capacity(unicode_blocks.size() + 1));
m_unicode_block_list.unchecked_append(TRY(String::from_utf8("Show All"sv)));
m_unicode_block_list.unchecked_append("Show All"_string);
for (auto& block : unicode_blocks)
m_unicode_block_list.unchecked_append(TRY(String::from_utf8(block.display_name)));