mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:07:46 +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
|
@ -29,11 +29,11 @@ public:
|
|||
return m_min_code_point <= code_point && code_point <= m_max_code_point;
|
||||
}
|
||||
|
||||
ErrorOr<String> to_string() const
|
||||
String to_string() const
|
||||
{
|
||||
if (m_min_code_point == m_max_code_point)
|
||||
return String::formatted("U+{:x}", m_min_code_point);
|
||||
return String::formatted("U+{:x}-{:x}", m_min_code_point, m_max_code_point);
|
||||
return MUST(String::formatted("U+{:x}", m_min_code_point));
|
||||
return MUST(String::formatted("U+{:x}-{:x}", m_min_code_point, m_max_code_point));
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue