eastl-rs 0.16.4

EASTL binary-compatible Rust implementations
Documentation
1
2
3
4
5
6
7
8
9
10
11
use std::mem;

/// Rotates the pair of iterators towards `next`.
pub unsafe fn rotate<'a, I: 'a, I1: Iterator<Item = &'a mut I>, I2: Iterator<Item = &'a mut I>>(
    mut current: I1,
    mut next: I2,
) {
    while let (Some(current), Some(next)) = (current.next(), next.next()) {
        mem::swap(current, next)
    }
}