I implemented a global-singleton callback in Rust that edits a SharedString by iterating over its characters, filtering them and collect()ing them back into a String, then using .into() to return a SharedString again.
Looking at the source code, this copies the data unnecessarily. If SharedString implemented FromIterator, I could directly collect() into a SharedString.
I implemented a global-singleton callback in Rust that edits a
SharedString
by iterating over its characters, filtering them andcollect()
ing them back into aString
, then using.into()
to return aSharedString
again.Looking at the source code, this copies the data unnecessarily. If
SharedString
implementedFromIterator
, I could directlycollect()
into aSharedString
.