1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:27:34 +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

@ -24,7 +24,7 @@ public:
static Time make_seconds(double);
Time percentage_of(Percentage const&) const;
ErrorOr<String> to_string() const;
String to_string() const;
double to_milliseconds() const;
double to_seconds() const;
@ -61,6 +61,6 @@ template<>
struct AK::Formatter<Web::CSS::Time> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::Time const& time)
{
return Formatter<StringView>::format(builder, TRY(time.to_string()));
return Formatter<StringView>::format(builder, time.to_string());
}
};