mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
fix(clippy): add missing annotations for transmute usage in root.rs (#33728)
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
parent
c1b744b2b2
commit
609a6ef0f4
1 changed files with 2 additions and 2 deletions
|
@ -169,7 +169,7 @@ impl<T: Castable> DomRoot<T> {
|
||||||
U: Castable,
|
U: Castable,
|
||||||
T: DerivedFrom<U>,
|
T: DerivedFrom<U>,
|
||||||
{
|
{
|
||||||
unsafe { mem::transmute(root) }
|
unsafe { mem::transmute::<DomRoot<T>, DomRoot<U>>(root) }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Cast a DOM object root downwards to one of the interfaces it might implement.
|
/// Cast a DOM object root downwards to one of the interfaces it might implement.
|
||||||
|
@ -178,7 +178,7 @@ impl<T: Castable> DomRoot<T> {
|
||||||
U: DerivedFrom<T>,
|
U: DerivedFrom<T>,
|
||||||
{
|
{
|
||||||
if root.is::<U>() {
|
if root.is::<U>() {
|
||||||
Some(unsafe { mem::transmute(root) })
|
Some(unsafe { mem::transmute::<DomRoot<T>, DomRoot<U>>(root) })
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue