Skip to content

Commit d30d29a

Browse files
kylewlacyfasterthanlime
authored andcommitted
Add next_back impl for BTreeSet iter
1 parent 54027ea commit d30d29a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

facet-core/src/impls_alloc/btreeset.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,14 @@ where
134134
.next()
135135
.map(|value| PtrConst::new(value as *const T))
136136
})
137+
.next_back(|iter_ptr| {
138+
let state = unsafe {
139+
iter_ptr.as_mut::<BTreeSetIterator<'_, T>>()
140+
};
141+
state
142+
.next_back()
143+
.map(|value| PtrConst::new(value as *const T))
144+
})
137145
.dealloc(|iter_ptr| unsafe {
138146
drop(Box::from_raw(
139147
iter_ptr.as_ptr::<BTreeSetIterator<'_, T>>()

0 commit comments

Comments
 (0)