Skip to content

Commit c265be4

Browse files
committed
LibWeb/HTML: Remove unused owned_attributes_from_ffi
1 parent 8cc5d7a commit c265be4

1 file changed

Lines changed: 0 additions & 24 deletions

File tree

  • Libraries/LibWeb/HTML/Parser/Rust/src

Libraries/LibWeb/HTML/Parser/Rust/src/parser.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4468,30 +4468,6 @@ unsafe fn utf16_namespace_uri_from_ffi(
44684468
Some(unsafe { utf16_string_from_ffi(ptr, len) })
44694469
}
44704470

4471-
unsafe fn owned_attributes_from_ffi(
4472-
attributes: *const RustFfiHtmlParserAttribute,
4473-
attribute_count: usize,
4474-
) -> Vec<OwnedAttribute> {
4475-
if attributes.is_null() || attribute_count == 0 {
4476-
return Vec::new();
4477-
}
4478-
4479-
let attributes = unsafe { std::slice::from_raw_parts(attributes, attribute_count) };
4480-
attributes
4481-
.iter()
4482-
.map(|attribute| OwnedAttribute {
4483-
local_name: unsafe { utf16_string_from_ffi(attribute.local_name_ptr, attribute.local_name_len) },
4484-
prefix: if attribute.prefix_len == 0 {
4485-
None
4486-
} else {
4487-
Some(unsafe { utf16_string_from_ffi(attribute.prefix_ptr, attribute.prefix_len) })
4488-
},
4489-
namespace_: attribute.namespace_,
4490-
value: unsafe { utf16_string_from_ffi(attribute.value_ptr, attribute.value_len) },
4491-
})
4492-
.collect()
4493-
}
4494-
44954471
unsafe fn owned_context_attributes_from_ffi(
44964472
attributes: *const RustFfiHtmlParserContextAttribute,
44974473
attribute_count: usize,

0 commit comments

Comments
 (0)