1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:17: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

@ -25,9 +25,9 @@ Time Time::percentage_of(Percentage const& percentage) const
return Time { percentage.as_fraction() * m_value, m_type };
}
ErrorOr<String> Time::to_string() const
String Time::to_string() const
{
return String::formatted("{}s", to_seconds());
return MUST(String::formatted("{}s", to_seconds()));
}
double Time::to_seconds() const