mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
Everywhere: Split Error::from_string_literal and Error::from_string_view
Error::from_string_literal now takes direct char const*s, while Error::from_string_view does what Error::from_string_literal used to do: taking StringViews. This change will remove the need to insert `sv` after error strings when returning string literal errors once StringView(char const*) is removed. No functional changes.
This commit is contained in:
parent
c70f45ff44
commit
e5f09ea170
Notes:
sideshowbarker
2024-07-17 09:27:09 +09:00
Author: https://github.com/sin-ack
Commit: e5f09ea170
Pull-request: https://github.com/SerenityOS/serenity/pull/14555
Reviewed-by: https://github.com/Dexesttp ✅
Reviewed-by: https://github.com/kleinesfilmroellchen
51 changed files with 282 additions and 261 deletions
|
@ -22,7 +22,7 @@ ErrorOr<CommandResult> command(String const& command_string, Optional<LexicalPat
|
|||
{
|
||||
auto parts = command_string.split(' ');
|
||||
if (parts.is_empty())
|
||||
return Error::from_string_literal("empty command"sv);
|
||||
return Error::from_string_literal("empty command");
|
||||
auto program = parts[0];
|
||||
parts.remove(0);
|
||||
return command(program, parts, chdir);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue