mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb: Use from_deprecated_fly_string() instead of from_utf8()
Use FlyString::from_deprecated_fly_string() in these instances instead of FlyString::from_utf8(). As we convert to new FlyString/String we want to be aware of these potential unnecessary allocations.
This commit is contained in:
parent
e28a6d5da4
commit
be958a14cf
Notes:
sideshowbarker
2024-07-17 05:13:53 +09:00
Author: https://github.com/kennethmyhra
Commit: be958a14cf
Pull-request: https://github.com/SerenityOS/serenity/pull/17785
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/alimpfard
4 changed files with 7 additions and 7 deletions
|
@ -32,7 +32,7 @@ static inline bool matches_lang_pseudo_class(DOM::Element const& element, Vector
|
|||
for (auto const* e = &element; e; e = e->parent_element()) {
|
||||
auto lang = e->attribute(HTML::AttributeNames::lang);
|
||||
if (!lang.is_null()) {
|
||||
element_language = FlyString::from_utf8(lang).release_value_but_fixme_should_propagate_errors();
|
||||
element_language = FlyString::from_deprecated_fly_string(lang).release_value_but_fixme_should_propagate_errors();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue