ignite/var/
swap.rs

1/// Swap two variables. But instead of using references, they will be consumed
2/// and new bindings will be produced.
3#[inline]
4pub fn swap<T>(x: T, y: T) -> (T, T) {
5    let (y, x) = (x, y);
6
7    (y, x)
8}