(&mut self, iter: T)
| 590 | /// like concatenating ill-formed UTF-16 strings effectively would. |
| 591 | impl Extend<CodePoint> for Wtf8Buf { |
| 592 | fn extend<T: IntoIterator<Item = CodePoint>>(&mut self, iter: T) { |
| 593 | let iterator = iter.into_iter(); |
| 594 | let (low, _high) = iterator.size_hint(); |
| 595 | // Lower bound of one byte per code point (ASCII only) |
| 596 | self.bytes.reserve(low); |
| 597 | iterator.for_each(move |code_point| self.push(code_point)); |
| 598 | } |
| 599 | } |
| 600 | |
| 601 | impl Extend<char> for Wtf8Buf { |