Closed burdges closed 4 years ago
Thanks! I suppose monomorphization creates another issue if you wind up with separate entry points for each &mut &mut .. &mut R
.
I've no idea if Rust can optimize those away, but if not then maybe idiomatic usage should really by BorrowMut<R>
whenever you might want both R
and &mut R
.
I suppose
rand::distributions::Distribution::sample
takes a&mut R
instead of anR
because otherwise the errors get confusing?