1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:08:12 +00:00

LibWeb: Convert CSS Token::to_debug_string() to ::to_string() :^)

Using from_utf8_short_string() for all cases that are <= 3 bytes long.
Which is almost all of the static ones.
This commit is contained in:
Sam Atkins 2023-02-11 16:47:52 +00:00 committed by Linus Groh
parent 2368e6c5f2
commit 476ec563bc
4 changed files with 30 additions and 30 deletions

View file

@ -29,7 +29,7 @@ ComponentValue::~ComponentValue() = default;
DeprecatedString ComponentValue::to_deprecated_string() const
{
return m_value.visit(
[](Token const& token) { return token.to_deprecated_string(); },
[](Token const& token) { return token.to_string().release_value_but_fixme_should_propagate_errors().to_deprecated_string(); },
[](NonnullRefPtr<Block> const& block) { return block->to_deprecated_string(); },
[](NonnullRefPtr<Function> const& function) { return function->to_deprecated_string(); });
}