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

Method clone

crates/common/src/boxvec.rs:595–599  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

593 T: Clone,
594{
595 fn clone(&self) -> Self {
596 let mut new = Self::new(self.capacity());
597 new.extend(self.iter().cloned());
598 new
599 }
600
601 fn clone_from(&mut self, rhs: &Self) {
602 // recursive case for the common prefix

Callers

nothing calls this directly

Calls 4

newFunction · 0.85
capacityMethod · 0.45
extendMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected