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

Method reverse

crates/vm/src/stdlib/_collections.rs:249–252  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

247
248 #[pymethod]
249 fn reverse(&self) {
250 let rev: VecDeque<_> = self.borrow_deque().iter().cloned().rev().collect();
251 *self.borrow_deque_mut() = rev;
252 }
253
254 #[pymethod]
255 fn __reversed__(zelf: PyRef<Self>) -> PyResult<PyReverseDequeIterator> {

Callers 7

extendleftMethod · 0.45
run_at_forkersFunction · 0.45
as_bufferMethod · 0.45
set_fieldMethod · 0.45
get_fieldMethod · 0.45
value_to_bytes_endianFunction · 0.45
valueMethod · 0.45

Calls 5

collectMethod · 0.80
borrow_dequeMethod · 0.80
borrow_deque_mutMethod · 0.80
revMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected