Documentation

mMut

MutPair

Get mutalbe references to two locations in Collection by key.

use mmut::MutPair;
let mut v = vec![1, 2, 3, 4, 5];

let (a, b) = v.two_mut(1, 3).unwrap();
*a = 8;
*b = 7;


assert_eq!(v, vec![1, 8, 3, 7, 5]);