MCPcopy Create free account
hub / github.com/FuzzAnything/PromptFuzz / eat_token

Method eat_token

src/program/serde.rs:124–130  ·  view source on GitHub ↗
(&mut self, token: &str)

Source from the content-addressed store, hash-verified

122 }
123
124 pub fn eat_token(&mut self, token: &str) -> Result<()> {
125 if self.input.starts_with(token) {
126 self.input = self.input[token.len()..].trim();
127 return Ok(());
128 }
129 eyre::bail!("input `{}` should start with {token}.", self.input)
130 }
131
132 pub fn is_next_token(&self, token: &str) -> bool {
133 self.input.starts_with(token)

Callers 7

parse_fuzzer_lcov_dataFunction · 0.80
parse_lcov_dataFunction · 0.80
consume_token_untilMethod · 0.80
parse_vecMethod · 0.80
deserializeMethod · 0.80
to_gadget_typeFunction · 0.80
newMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected