mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:07:36 +00:00
AK: Make "foo"_string infallible
Stop worrying about tiny OOMs. Work towards #20405.
This commit is contained in:
parent
db2a8725c6
commit
34344120f2
181 changed files with 626 additions and 630 deletions
|
@ -95,7 +95,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
dbgln("Loading man page from {}", TRY(page->path()));
|
||||
auto buffer = TRY(file->read_until_eof());
|
||||
|
||||
auto const title = TRY("SerenityOS manual"_string);
|
||||
auto const title = "SerenityOS manual"_string;
|
||||
|
||||
int spaces = max(view_width / 2 - page_name.code_points().length() - section_number.code_points().length() - title.code_points().length() / 2 - 4, 0);
|
||||
outln("{}({}){}{}", page_name, section_number, String::repeated(' ', spaces), title);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue