From 3ade2b6de36bf08bd1ccb98ec74b62b4b0fe3c1c Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Tue, 18 Oct 2016 15:40:23 +1100 Subject: [PATCH] Use mutable reference for Gecko_GetNextStyleChild. --- components/style/gecko/wrapper.rs | 4 ++-- components/style/gecko_bindings/bindings.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index 621fef9b5fa..c5588ca4b97 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -438,8 +438,8 @@ impl<'a> Iterator for GeckoChildrenIterator<'a> { *self = GeckoChildrenIterator::Current(next); curr }, - GeckoChildrenIterator::GeckoIterator(ref it) => unsafe { - Gecko_GetNextStyleChild(&it).map(GeckoNode) + GeckoChildrenIterator::GeckoIterator(ref mut it) => unsafe { + Gecko_GetNextStyleChild(it).map(GeckoNode) } } } diff --git a/components/style/gecko_bindings/bindings.rs b/components/style/gecko_bindings/bindings.rs index 4def95850e1..7c219fceeb3 100644 --- a/components/style/gecko_bindings/bindings.rs +++ b/components/style/gecko_bindings/bindings.rs @@ -242,7 +242,7 @@ extern "C" { pub fn Gecko_DropStyleChildrenIterator(it: StyleChildrenIteratorOwned); } extern "C" { - pub fn Gecko_GetNextStyleChild(it: StyleChildrenIteratorBorrowed) + pub fn Gecko_GetNextStyleChild(it: StyleChildrenIteratorBorrowedMut) -> RawGeckoNodeBorrowedOrNull; } extern "C" {