MCPcopy Create free account
hub / github.com/astral-sh/ruff / take

Method take

crates/ruff_python_parser/src/parser/scratch_buffer.rs:46–48  ·  view source on GitHub ↗
(&mut self, snapshot: ScratchSnapshot)

Source from the content-addressed store, hash-verified

44
45 #[inline]
46 pub(super) fn take<C: FromIterator<T>>(&mut self, snapshot: ScratchSnapshot) -> C {
47 self.drain_snapshot(snapshot).collect()
48 }
49
50 #[inline]
51 pub(super) fn take_thin_vec(&mut self, mut snapshot: ScratchSnapshot) -> ThinVec<T> {

Callers 15

format_lineMethod · 0.45
offsetMethod · 0.45
nextMethod · 0.45
next_backMethod · 0.45
parse_fill_and_alignFunction · 0.45
fmtMethod · 0.45
push_markerMethod · 0.45
trim_indentMethod · 0.45
addMethod · 0.45
finishMethod · 0.45

Calls 2

drain_snapshotMethod · 0.80
collectMethod · 0.45

Tested by 3

dropMethod · 0.36