mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +00:00
LibWeb: Make StyleValue::to_string() infallible
This commit is contained in:
parent
ccfe197e5a
commit
7fe97ee6c5
112 changed files with 425 additions and 430 deletions
|
@ -16,19 +16,19 @@ ValueComparingNonnullRefPtr<GridTemplateAreaStyleValue> GridTemplateAreaStyleVal
|
|||
return adopt_ref(*new (nothrow) GridTemplateAreaStyleValue(grid_template_area));
|
||||
}
|
||||
|
||||
ErrorOr<String> GridTemplateAreaStyleValue::to_string() const
|
||||
String GridTemplateAreaStyleValue::to_string() const
|
||||
{
|
||||
StringBuilder builder;
|
||||
for (size_t y = 0; y < m_grid_template_area.size(); ++y) {
|
||||
for (size_t x = 0; x < m_grid_template_area[y].size(); ++x) {
|
||||
TRY(builder.try_appendff("{}", m_grid_template_area[y][x]));
|
||||
builder.appendff("{}", m_grid_template_area[y][x]);
|
||||
if (x < m_grid_template_area[y].size() - 1)
|
||||
TRY(builder.try_append(" "sv));
|
||||
builder.append(" "sv);
|
||||
}
|
||||
if (y < m_grid_template_area.size() - 1)
|
||||
TRY(builder.try_append(", "sv));
|
||||
builder.append(", "sv);
|
||||
}
|
||||
return builder.to_string();
|
||||
return MUST(builder.to_string());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue