From 5f2f26451da868a2eb60c105c9a00e14eb297b56 Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Sun, 10 Dec 2023 15:42:30 +1300 Subject: [PATCH] AK: Disallow String::from_utf8 on FlyString and String --- AK/String.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AK/String.h b/AK/String.h index a8471ee4e5..e54b7fb4f2 100644 --- a/AK/String.h +++ b/AK/String.h @@ -67,7 +67,7 @@ public: // Creates a new String from a sequence of UTF-8 encoded code points. static ErrorOr from_utf8(StringView); template - requires(IsOneOf, DeprecatedString, DeprecatedFlyString>) + requires(IsOneOf, DeprecatedString, DeprecatedFlyString, FlyString, String>) static ErrorOr from_utf8(T&&) = delete; // Creates a new String by reading byte_count bytes from a UTF-8 encoded Stream.