1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:17:35 +00:00

AK: Make "foo"_fly_string infallible

Stop worrying about tiny OOMs.

Work towards #20405.
This commit is contained in:
Andreas Kling 2023-08-07 12:07:35 +02:00
parent 34344120f2
commit 25eee91811
30 changed files with 59 additions and 72 deletions

View file

@ -89,9 +89,9 @@ struct Formatter<FlyString> : Formatter<StringView> {
}
[[nodiscard]] ALWAYS_INLINE AK::ErrorOr<AK::FlyString> operator""_fly_string(char const* cstring, size_t length)
[[nodiscard]] ALWAYS_INLINE AK::FlyString operator""_fly_string(char const* cstring, size_t length)
{
return AK::FlyString::from_utf8(AK::StringView(cstring, length));
return AK::FlyString::from_utf8(AK::StringView(cstring, length)).release_value();
}
#if USING_AK_GLOBALLY