mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
LibWeb: Make serializing CSS Parser types infallible
This commit is contained in:
parent
846c719e49
commit
ccfe197e5a
12 changed files with 57 additions and 57 deletions
|
@ -35,8 +35,8 @@ public:
|
|||
Token const& token() const { return m_value.get<Token>(); }
|
||||
operator Token() const { return m_value.get<Token>(); }
|
||||
|
||||
ErrorOr<String> to_string() const;
|
||||
ErrorOr<String> to_debug_string() const;
|
||||
String to_string() const;
|
||||
String to_debug_string() const;
|
||||
|
||||
private:
|
||||
Variant<Token, NonnullRefPtr<Function>, NonnullRefPtr<Block>> m_value;
|
||||
|
@ -47,6 +47,6 @@ template<>
|
|||
struct AK::Formatter<Web::CSS::Parser::ComponentValue> : Formatter<StringView> {
|
||||
ErrorOr<void> format(FormatBuilder& builder, Web::CSS::Parser::ComponentValue const& component_value)
|
||||
{
|
||||
return Formatter<StringView>::format(builder, TRY(component_value.to_string()));
|
||||
return Formatter<StringView>::format(builder, component_value.to_string());
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue