style: Remove some uses of unused unsafe.

This commit is contained in:
Emilio Cobos Álvarez 2017-11-13 22:37:45 +01:00
parent 2efbf2230a
commit 69ddb9501b
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
10 changed files with 45 additions and 60 deletions

View file

@ -37,9 +37,7 @@ impl SnapshotMap {
debug_assert!(element.has_snapshot());
unsafe {
let element =
unsafe { ::std::mem::transmute::<&E, &GeckoElement>(element) };
let element = ::std::mem::transmute::<&E, &GeckoElement>(element);
bindings::Gecko_GetElementSnapshot(self, element.0).as_ref()
}
}
@ -171,8 +169,7 @@ impl ElementSnapshot for GeckoElementSnapshot {
}
let ptr = unsafe {
bindings::Gecko_SnapshotAtomAttrValue(self,
atom!("id").as_ptr())
bindings::Gecko_SnapshotAtomAttrValue(self, atom!("id").as_ptr())
};
if ptr.is_null() {