summaryrefslogtreecommitdiff
path: root/Userland/Utilities/ls.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-11-26 22:32:37 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-26 23:27:57 +0100
commitf1cc3d0fc48af5247278101f863d6416f763733e (patch)
tree56029f2d24e02d6028e6ea45c3037865739527c9 /Userland/Utilities/ls.cpp
parent395ba619d8b0a5ac38368991a9da445cfb0e03a9 (diff)
downloadserenity-f1cc3d0fc48af5247278101f863d6416f763733e.zip
Userland: Use Core::ArgsParser's Vector<StringView> API everywhere
...and remove the Vector<String> variant since there are no remaining users of this API.
Diffstat (limited to 'Userland/Utilities/ls.cpp')
-rw-r--r--Userland/Utilities/ls.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Utilities/ls.cpp b/Userland/Utilities/ls.cpp
index 8704f5caf3..39614ed889 100644
--- a/Userland/Utilities/ls.cpp
+++ b/Userland/Utilities/ls.cpp
@@ -98,7 +98,7 @@ int main(int argc, char** argv)
return 1;
}
- Vector<String> paths;
+ Vector<StringView> paths;
Core::ArgsParser args_parser;
args_parser.set_general_help("List files in a directory.");
@@ -148,7 +148,7 @@ int main(int argc, char** argv)
FileMetadata metadata;
metadata.name = path;
- int rc = lstat(path.characters(), &metadata.stat);
+ int rc = lstat(String(path).characters(), &metadata.stat);
if (rc < 0)
perror("lstat");