mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Fix bogus transmute.
This commit is contained in:
parent
746b262ff4
commit
eafa8b48fc
1 changed files with 1 additions and 9 deletions
|
@ -657,15 +657,7 @@ pub struct DescendantIter<'a> {
|
|||
|
||||
impl<'a> Iterator<&'a mut Flow + 'a> for DescendantIter<'a> {
|
||||
fn next(&mut self) -> Option<&'a mut Flow + 'a> {
|
||||
match self.iter.next() {
|
||||
None => None,
|
||||
Some(ref mut flow) => {
|
||||
unsafe {
|
||||
let result: &'a mut Flow = mem::transmute(flow.deref_mut());
|
||||
Some(result)
|
||||
}
|
||||
}
|
||||
}
|
||||
self.iter.next().map(|flow| &mut **flow)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue