MCPcopy Index your code
hub / github.com/RustPython/RustPython / extend

Method extend

crates/wtf8/src/lib.rs:592–598  ·  view source on GitHub ↗
(&mut self, iter: T)

Source from the content-addressed store, hash-verified

590/// like concatenating ill-formed UTF-16 strings effectively would.
591impl 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
601impl Extend<char> for Wtf8Buf {

Callers 2

newMethod · 0.45
from_iterMethod · 0.45

Calls 7

push_wtf8Method · 0.80
into_iterMethod · 0.45
size_hintMethod · 0.45
reserveMethod · 0.45
pushMethod · 0.45
mapMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected