1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +00:00

Everywhere: Use '_{short_,}string' literals more

This mostly updates code what was written before but merged after these
were added.
This commit is contained in:
Linus Groh 2023-02-28 13:50:29 +00:00
parent d0ba5f2ed7
commit 51c3967516
15 changed files with 94 additions and 95 deletions

View file

@ -1714,7 +1714,7 @@ ErrorOr<Vector<Line::CompletionSuggestion>> Shell::complete_via_program_itself(s
else if (!options.invoke_program_for_autocomplete)
return Error::from_string_literal("Refusing to use the program itself as completion source");
completion_command.argv.extend({ TRY(String::from_utf8("--complete"sv)), String::from_utf8_short_string("--"sv) });
completion_command.argv.extend({ TRY("--complete"_string), "--"_short_string });
struct Visitor : public AST::NodeVisitor {
Visitor(Shell& shell, AST::Position position)
@ -1883,7 +1883,7 @@ ErrorOr<Vector<Line::CompletionSuggestion>> Shell::complete_via_program_itself(s
completion_command.argv.extend(visitor.list());
auto devnull = TRY(String::from_utf8("/dev/null"sv));
auto devnull = TRY("/dev/null"_string);
completion_command.should_wait = true;
completion_command.redirections.append(AST::PathRedirection::create(devnull, STDERR_FILENO, AST::PathRedirection::Write));
completion_command.redirections.append(AST::PathRedirection::create(devnull, STDIN_FILENO, AST::PathRedirection::Read));