pub fn swap3_cab<T>(a: &mut T, b: &mut T, c: &mut T)
Expand description
Rotates three values to the right.
§Arguments
a
- The first value, to be assigned with the value ofc
.b
- The second value, to be assigned with the value ofa
.c
- The third value, to be assigned with the value ofb
.
§Example
let mut a = 10;
let mut b = 20;
let mut c = 30;
swap3::swap3_cab(&mut a, &mut b, &mut c);
assert_eq!([a, b, c], [30, 10, 20]);