1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-07 15:57:35 +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

@ -111,7 +111,7 @@ static ErrorOr<Vector<String>> month_lines_to_print(Header header_mode, int star
int day = 1;
for (int i = 1; day <= days_in_month; ++i) {
if (i - 1 < first_day_of_week_for_month) {
TRY(days_in_row.try_append(TRY(String::from_utf8(" "sv))));
TRY(days_in_row.try_append(" "_string));
} else {
if (year == current_year && month == current_month && day == current_day) {
TRY(days_in_row.try_append(TRY(String::formatted(ANSI_INVERT_OUTPUT "{:2}" ANSI_RESET_OUTPUT, day))));