MCPcopy Create free account
hub / github.com/hashintel/hash / take_and_advance

Method take_and_advance

tests/graph/test-data/rust/src/seeding/context.rs:176–180  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

174 /// Panics if the local ID overflows.
175 #[must_use]
176 pub const fn take_and_advance(&mut self) -> Self {
177 let current = *self;
178 self.0 = current.0.checked_add(1).expect("local id overflow");
179 current
180 }
181}
182
183impl fmt::LowerHex for LocalId {

Callers 6

generateMethod · 0.80
generateMethod · 0.80
generateMethod · 0.80
generateMethod · 0.80
generateMethod · 0.80

Calls 2

checked_addMethod · 0.80
expectMethod · 0.45

Tested by 1