#closures #mutable #value #location #memory #reference #replace

nightly replace-map

Perform by-value operations through an &mut reference

7 releases

Uses old Rust 2015

0.0.7 Feb 11, 2015
0.0.6 Feb 10, 2015
0.0.5 Jan 23, 2015
0.0.3 Dec 9, 2014
0.0.2 Nov 11, 2014

#78 in #mutable

21 downloads per month

MIT license

3KB

Replace Map

Replace the value at a mutable memory location using a |: T| -> T closure.

Does not create an intermediate value, so is more efficient and ergonomic in cases where producing a value to pass to mem::replace is hard.


lib.rs:

Exposes replace_map, for replacing values at mutable memory locations.

No runtime deps