MCPcopy Index your code
hub / github.com/aiscriptdev/aiscript / count

Method count

aiscript-lexer/src/peakable.rs:31–37  ·  view source on GitHub ↗
(mut self)

Source from the content-addressed store, hash-verified

29
30 #[inline]
31 fn count(mut self) -> usize {
32 match self.peeked.take() {
33 Some(None) => 0,
34 Some(Some(_)) => 1 + self.iter.count(),
35 None => self.iter.count(),
36 }
37 }
38
39 #[inline]
40 fn nth(&mut self, n: usize) -> Option<I::Item> {

Callers 3

generate_functionMethod · 0.80
formatMethod · 0.80
countFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected