mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-04 15:19:16 +00:00
Userland: Don't use String::from_utf8()
for literal strings
This commit is contained in:
parent
4cc3c41269
commit
c74f7e5f2a
Notes:
sideshowbarker
2024-07-17 09:47:09 +09:00
Author: https://github.com/tcl3
Commit: c74f7e5f2a
Pull-request: https://github.com/SerenityOS/serenity/pull/21078
Reviewed-by: https://github.com/AtkinsSJ ✅
8 changed files with 15 additions and 15 deletions
|
@ -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))));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue