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

Method last

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

Source from the content-addressed store, hash-verified

48
49 #[inline]
50 fn last(mut self) -> Option<I::Item> {
51 let peek_opt = match self.peeked.take() {
52 Some(None) => return None,
53 Some(v) => v,
54 None => None,
55 };
56 self.iter.last().or(peek_opt)
57 }
58
59 #[inline]
60 fn size_hint(&self) -> (usize, Option<usize>) {

Callers 2

generate_stmtMethod · 0.80
import_moduleMethod · 0.80

Calls 1

orMethod · 0.45

Tested by

no test coverage detected