MCPcopy Create free account
hub / github.com/davidblewett/rure-python / insert

Method insert

regex/src/sparse.rs:46–51  ·  view source on GitHub ↗
(&mut self, value: usize)

Source from the content-addressed store, hash-verified

44 }
45
46 pub fn insert(&mut self, value: usize) {
47 let i = self.len();
48 assert!(i < self.capacity());
49 self.dense.push(value);
50 self.sparse[value] = i;
51 }
52
53 pub fn contains(&self, value: usize) -> bool {
54 let i = self.sparse[value];

Callers 4

cMethod · 0.45
add_stepMethod · 0.45
add_capture_nameMethod · 0.45
flag_setFunction · 0.45

Calls 2

lenMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected