Skip to content

Commit 5cc5091

Browse files
committed
Updated for the latest rust.
1 parent 610a315 commit 5cc5091

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/enumerator.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ fn enumerate<'a, 'b: 'a, C: INSFastEnumeration>(object: &'b C,
5151
state: &mut NSFastEnumerationState<C::Item>,
5252
buf: &'a mut [*const C::Item]) -> Option<&'a [*const C::Item]> {
5353
let count: usize = unsafe {
54+
// Reborrow state so that we don't move it
55+
let state = &mut *state;
5456
msg_send![object, countByEnumeratingWithState:state
5557
objects:buf.as_mut_ptr()
5658
count:buf.len()]

0 commit comments

Comments
 (0)