let sets = [
&mut HashSet::<char>::new(),
&mut HashSet::<char>::new(),
&mut HashSet::<char>::new(),
];
Why can't the above be:
let sets = [
mut HashSet::<char>::new(),
mut HashSet::<char>::new(),
mut HashSet::<char>::new(),
];
I don't need a mutable reference, just a mutable value.
I get a syntax error when I try this:
let sets = [
mut HashSet::<char>::new(),
mut HashSet::<char>::new(),
mut HashSet::<char>::new(),
];
let mut sets: [HashSet<char>; 3] = Default::default();is a shorter/less repetitive way to initialize that, by the way.