Use mutable reference for Gecko_GetNextStyleChild.

This commit is contained in:
Xidorn Quan 2016-10-18 15:40:23 +11:00
parent fe78c346a3
commit 3ade2b6de3
2 changed files with 3 additions and 3 deletions

View file

@ -438,8 +438,8 @@ impl<'a> Iterator for GeckoChildrenIterator<'a> {
*self = GeckoChildrenIterator::Current(next); *self = GeckoChildrenIterator::Current(next);
curr curr
}, },
GeckoChildrenIterator::GeckoIterator(ref it) => unsafe { GeckoChildrenIterator::GeckoIterator(ref mut it) => unsafe {
Gecko_GetNextStyleChild(&it).map(GeckoNode) Gecko_GetNextStyleChild(it).map(GeckoNode)
} }
} }
} }

View file

@ -242,7 +242,7 @@ extern "C" {
pub fn Gecko_DropStyleChildrenIterator(it: StyleChildrenIteratorOwned); pub fn Gecko_DropStyleChildrenIterator(it: StyleChildrenIteratorOwned);
} }
extern "C" { extern "C" {
pub fn Gecko_GetNextStyleChild(it: StyleChildrenIteratorBorrowed) pub fn Gecko_GetNextStyleChild(it: StyleChildrenIteratorBorrowedMut)
-> RawGeckoNodeBorrowedOrNull; -> RawGeckoNodeBorrowedOrNull;
} }
extern "C" { extern "C" {