MCPcopy Create free account
hub / github.com/IntegralPilot/rustc_codegen_jvm / set_limit

Method set_limit

tests/binary/impl/src/main.rs:114–120  ·  view source on GitHub ↗

Set a new limit. Clamps count if necessary.

(&mut self, new_limit: u32)

Source from the content-addressed store, hash-verified

112 }
113
114 let current_count = self.count;
115 let potential_count = if amount > u32::MAX - current_count {
116 u32::MAX
117 } else {
118 current_count + amount
119 };
120
121 if potential_count >= self.limit {
122 // Clamp to limit
123 self.count = self.limit;

Callers 1

mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected