mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 15:17:45 +00:00
LibWeb: Make serializing basic CSS types infallible
This commit is contained in:
parent
b5893ee115
commit
6bee81cfb6
38 changed files with 128 additions and 121 deletions
|
@ -23,7 +23,7 @@ public:
|
|||
static Frequency make_hertz(double);
|
||||
Frequency percentage_of(Percentage const&) const;
|
||||
|
||||
ErrorOr<String> to_string() const;
|
||||
String to_string() const;
|
||||
double to_hertz() const;
|
||||
|
||||
Type type() const { return m_type; }
|
||||
|
@ -59,6 +59,6 @@ template<>
|
|||
struct AK::Formatter<Web::CSS::Frequency> : Formatter<StringView> {
|
||||
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::Frequency const& frequency)
|
||||
{
|
||||
return Formatter<StringView>::format(builder, TRY(frequency.to_string()));
|
||||
return Formatter<StringView>::format(builder, frequency.to_string());
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue