mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:47:44 +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
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
|
||||
* Copyright (c) 2022-2023, Sam Atkins <atkinssj@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -22,9 +22,9 @@ bool Ratio::is_degenerate() const
|
|||
|| !isfinite(m_second_value) || m_second_value == 0;
|
||||
}
|
||||
|
||||
ErrorOr<String> Ratio::to_string() const
|
||||
String Ratio::to_string() const
|
||||
{
|
||||
return String::formatted("{} / {}", m_first_value, m_second_value);
|
||||
return MUST(String::formatted("{} / {}", m_first_value, m_second_value));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue