mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +00:00
Userland: Prefer _short_string
over String::from_utf8_short_string
This user-defined literal is a strictly equivalent but shorter alias to `String::from_utf8_short_string`.
This commit is contained in:
parent
66645cdc94
commit
a5edc9cdfc
7 changed files with 8 additions and 8 deletions
|
@ -191,7 +191,7 @@ RecursionDecision MarkdownLinkage::visit(Markdown::Text::LinkNode const& link_no
|
|||
return RecursionDecision::Recurse;
|
||||
}
|
||||
if (url.scheme() == "help") {
|
||||
if (url.host() != String::from_utf8_short_string("man"sv)) {
|
||||
if (url.host() != "man"_short_string) {
|
||||
warnln("help:// URL without 'man': {}", href);
|
||||
m_has_invalid_link = true;
|
||||
return RecursionDecision::Recurse;
|
||||
|
|
|
@ -138,7 +138,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto get_formatted_user = [&](i32 uid) -> ErrorOr<String> {
|
||||
if (uid == -1)
|
||||
return String::from_utf8_short_string("-"sv);
|
||||
return "-"_short_string;
|
||||
|
||||
return String::number(uid);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue