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

Method clear

crates/common/src/boxvec.rs:183–185  ·  view source on GitHub ↗

Remove all elements in the vector.

(&mut self)

Source from the content-addressed store, hash-verified

181
182 /// Remove all elements in the vector.
183 pub fn clear(&mut self) {
184 self.truncate(0)
185 }
186
187 /// Retains only the elements specified by the predicate.
188 ///

Callers 7

dropMethod · 0.45
compile_pattern_orMethod · 0.45
compile_match_innerMethod · 0.45
finalize_codeMethod · 0.45
remove_unused_constsMethod · 0.45

Calls 1

truncateMethod · 0.45

Tested by

no test coverage detected