mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
Userland: Don't use String::from_utf8()
for literal strings
This commit is contained in:
parent
4cc3c41269
commit
c74f7e5f2a
Notes:
sideshowbarker
2024-07-17 09:47:09 +09:00
Author: https://github.com/tcl3
Commit: c74f7e5f2a
Pull-request: https://github.com/SerenityOS/serenity/pull/21078
Reviewed-by: https://github.com/AtkinsSJ ✅
8 changed files with 15 additions and 15 deletions
|
@ -26,7 +26,7 @@ ErrorOr<HashMap<String, InstalledPort>> InstalledPort::read_ports_database()
|
|||
auto type = InstalledPort::Type::Dependency;
|
||||
// FIXME: Add versioning when printing these ports!
|
||||
auto name = TRY(String::from_utf8(parts[2]));
|
||||
TRY(ports.try_set(name, InstalledPort { TRY(String::from_utf8(parts[2])), type, TRY(String::from_utf8(""sv)) }));
|
||||
TRY(ports.try_set(name, InstalledPort { TRY(String::from_utf8(parts[2])), type, {} }));
|
||||
} else if (line.starts_with("auto"sv)) {
|
||||
auto parts = line.split_view(' ');
|
||||
VERIFY(parts.size() == 3);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue