Userland: Use Core::ArgsParser's Vector<StringView> API everywhere

...and remove the Vector<String> variant since there are no remaining
users of this API.
This commit is contained in:
Andreas Kling 2021-11-26 22:32:37 +01:00
commit f1cc3d0fc4
Notes: sideshowbarker 2024-07-18 00:38:48 +09:00
17 changed files with 31 additions and 47 deletions

View file

@ -16,7 +16,7 @@ int main(int argc, char** argv)
return 1;
}
Vector<String> paths;
Vector<StringView> paths;
Core::ArgsParser args_parser;
args_parser.set_general_help("Concatenate files or pipes to stdout, last line first.");
@ -33,7 +33,7 @@ int main(int argc, char** argv)
if (path == "-"sv) {
stream = stdin;
} else {
stream = fopen(path.characters(), "r");
stream = fopen(String(path).characters(), "r");
if (!stream) {
warnln("Failed to open {}: {}", path, strerror(errno));
continue;