mirror of
https://github.com/servo/servo.git
synced 2025-10-18 01:09:16 +01:00
Remove some unnecessary transmutes.
These can either be done by implicit `&` -> `*` coercions, explicit `*` -> `*` casts, or an explicit `&*x` `*` -> `&` re-borrow (which is still unsafe, but significantly more controlled compared to a `transmute`).
This commit is contained in:
parent
3401a568f2
commit
94e4ab3eaf
5 changed files with 14 additions and 19 deletions
|
@ -163,9 +163,7 @@ impl Element {
|
|||
return false
|
||||
}
|
||||
let owner_doc: *JS<Document> = self.node.owner_doc();
|
||||
let owner_doc: **Document = cast::transmute::<*JS<Document>,
|
||||
**Document>(
|
||||
owner_doc);
|
||||
let owner_doc: **Document = owner_doc as **Document;
|
||||
(**owner_doc).is_html_document
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue