mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:18:12 +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
|
@ -19,18 +19,18 @@ Declaration::Declaration(FlyString name, Vector<ComponentValue> values, Importan
|
|||
|
||||
Declaration::~Declaration() = default;
|
||||
|
||||
ErrorOr<String> Declaration::to_string() const
|
||||
String Declaration::to_string() const
|
||||
{
|
||||
StringBuilder builder;
|
||||
|
||||
serialize_an_identifier(builder, m_name);
|
||||
TRY(builder.try_append(": "sv));
|
||||
TRY(builder.try_join(' ', m_values));
|
||||
builder.append(": "sv);
|
||||
builder.join(' ', m_values);
|
||||
|
||||
if (m_important == Important::Yes)
|
||||
TRY(builder.try_append(" !important"sv));
|
||||
builder.append(" !important"sv);
|
||||
|
||||
return builder.to_string();
|
||||
return MUST(builder.to_string());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue