MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / charge

Method charge

atomic-audit/src/substantive/mod.rs:22–28  ·  view source on GitHub ↗
(&mut self, node: Node<'_>)

Source from the content-addressed store, hash-verified

20
21impl Context<'_> {
22 fn charge(&mut self, node: Node<'_>) -> Result<(), &'static str> {
23 self.remaining = self
24 .remaining
25 .checked_sub(node.end_byte() - node.start_byte())
26 .ok_or("Substantive audit work budget exceeded; inspection is incomplete")?;
27 Ok(())
28 }
29
30 fn normalized(&mut self, node: Node<'_>) -> Result<Vec<tokens::Token>, &'static str> {
31 self.charge(node)?;

Callers 4

inspectFunction · 0.45
guard_across_awaitFunction · 0.45
normalizedMethod · 0.45
manageabilityFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected