mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Remove some transmute calls.
This commit is contained in:
parent
9857ea26cb
commit
0031498e6b
2 changed files with 3 additions and 3 deletions
|
@ -226,8 +226,8 @@ pub trait RawLayoutElementHelpers {
|
|||
#[inline]
|
||||
unsafe fn get_attr_for_layout<'a>(elem: &'a Element, namespace: &Namespace, name: &Atom) -> Option<&'a JS<Attr>> {
|
||||
// cast to point to T in RefCell<T> directly
|
||||
let attrs: *const Vec<JS<Attr>> = mem::transmute(&elem.attrs);
|
||||
(*attrs).iter().find(|attr: & &JS<Attr>| {
|
||||
let attrs = elem.attrs.borrow_for_layout();
|
||||
attrs.iter().find(|attr: & &JS<Attr>| {
|
||||
let attr = attr.unsafe_get();
|
||||
*name == (*attr).local_name_atom_forever() &&
|
||||
(*attr).namespace() == namespace
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue