PoignardAzur / venial

"A very small syn"
MIT License
196 stars 7 forks source link

Add `DerefMut` for `Punctuated` #6

Closed jcaesar closed 2 years ago

jcaesar commented 2 years ago

Necessary for writing code like

let mut modify: Punctuated<T> = …;
for (v, _p) in modify.iter_mut() {
    *v = …;
}

(My current workaround is to clone everything, modify, push it to a new punctuated, and then replace the old punctuated.)