summaryrefslogtreecommitdiff
path: root/Userland/Utilities
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2023-02-13 17:23:31 +0000
committerTim Flynn <trflynn89@pm.me>2023-02-15 12:48:26 -0500
commitd6075ef5b52fcf281270c192f01aa59d821a6528 (patch)
tree51db5903bd06bd465a6255755c5b2257a2dd5569 /Userland/Utilities
parent3c8bfa46626594c126f2835090e84ac5bb51167b (diff)
downloadserenity-d6075ef5b52fcf281270c192f01aa59d821a6528.zip
LibTextCodec+Everywhere: Make TextCodec::decoder_for() take a StringView
We don't need a full String/DeprecatedString inside this function, so we might as well not force users to create one.
Diffstat (limited to 'Userland/Utilities')
-rw-r--r--Userland/Utilities/js.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Utilities/js.cpp b/Userland/Utilities/js.cpp
index a12af0420d..13ee8ba579 100644
--- a/Userland/Utilities/js.cpp
+++ b/Userland/Utilities/js.cpp
@@ -877,7 +877,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
if (Utf8View { file_contents }.validate()) {
builder.append(source);
} else {
- auto* decoder = TextCodec::decoder_for("windows-1252");
+ auto* decoder = TextCodec::decoder_for("windows-1252"sv);
VERIFY(decoder);
auto utf8_source = TextCodec::convert_input_to_utf8_using_given_decoder_unless_there_is_a_byte_order_mark(*decoder, source);