AndWass / pushgen

Apache License 2.0
27 stars 4 forks source link

Refactor IteratorAdaptor::fold: Replace use of unwrap with InplaceUpdatable #42

Closed NobodyXu closed 3 years ago

NobodyXu commented 3 years ago

Also add new struct utility::InplaceUpdatable:

Implements associated methods for safely replacing a &mut value without any unsafe fn and doesn't pose any UB under panic unwind.

AndWass commented 3 years ago

Nice! Looks very good! Thanks!