ParentFull threadmastax·Yes, however for this specific situation `replace()` is not an iterator adapter but a method of `str` which returns a newly allocated `String`. In practice, the compiler does not do something smarter than that: https://rust.godbolt.org/z/z573MvjzzView on HN