MCPcopy Create free account
hub / github.com/PRQL/prql / break_up

Method break_up

prqlc/prqlc/src/utils/mod.rs:72–79  ·  view source on GitHub ↗
(mut self, f: F)

Source from the content-addressed store, hash-verified

70
71impl<T> BreakUp<T> for Vec<T> {
72 fn break_up<F>(mut self, f: F) -> (Vec<T>, Vec<T>)
73 where
74 F: FnMut(&T) -> bool,
75 {
76 let position = self.iter().position(f).unwrap_or(self.len());
77 let after = self.drain(position..).collect_vec();
78 (self, after)
79 }
80}
81
82pub(crate) fn valid_ident() -> &'static Regex {

Callers 3

translate_pipelineFunction · 0.80
compile_loopFunction · 0.80

Calls 2

iterMethod · 0.80
lenMethod · 0.80

Tested by

no test coverage detected