1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:37:35 +00:00

LibWeb: Make serializing basic CSS types infallible

This commit is contained in:
Sam Atkins 2023-08-22 12:25:30 +01:00 committed by Sam Atkins
parent b5893ee115
commit 6bee81cfb6
38 changed files with 128 additions and 121 deletions

View file

@ -88,7 +88,7 @@ bool Size::contains_percentage() const
}
}
ErrorOr<String> Size::to_string() const
String Size::to_string() const
{
switch (m_type) {
case Type::Auto:
@ -102,7 +102,7 @@ ErrorOr<String> Size::to_string() const
case Type::MaxContent:
return "max-content"_string;
case Type::FitContent:
return String::formatted("fit-content({})", TRY(m_length_percentage.to_string()));
return MUST(String::formatted("fit-content({})", m_length_percentage.to_string()));
case Type::None:
return "none"_string;
}