icu4x
icu4x copied to clipboard
Add return type to `Yoke::with_mut` and `Yokeable::transform_mut`
I believe this is still sound since R
can't involve 'b
.
fn with_mut<'a, F, R>(&'a mut self, f: F) -> R
where
F: 'static + for<'b> FnOnce(&'b mut <Y as Yokeable<'a>>::Output) -> R;
fn transform_mut<F, R>(&'a mut self, f: F) -> R
where
F: 'static + for<'b> FnOnce(&'b mut Self::Output) -> R;
This would be a breaking change, mainly for anyone manually implementing Yokeable
.
Notably, this lets us easily call Iterator::next
on an iter in a yoke, or even implement Iterator
for Yoke
.