mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 20:42:21 +00:00
AK: Make "foo"_string infallible
Stop worrying about tiny OOMs. Work towards #20405.
This commit is contained in:
parent
db2a8725c6
commit
34344120f2
Notes:
sideshowbarker
2024-07-16 20:31:50 +09:00
Author: https://github.com/awesomekling
Commit: 34344120f2
Pull-request: https://github.com/SerenityOS/serenity/pull/20408
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