MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / resize

Method resize

cranelift/entity/src/map.rs:181–183  ·  view source on GitHub ↗

Resize the map to have `n` entries by adding default entries as needed.

(&mut self, n: usize)

Source from the content-addressed store, hash-verified

179
180 /// Resize the map to have `n` entries by adding default entries as needed.
181 pub fn resize(&mut self, n: usize) {
182 self.elems.resize(n, self.default.clone());
183 }
184
185 /// Like `resize` but returns an error on allocation failure.
186 pub fn try_resize(&mut self, n: usize) -> Result<(), OutOfMemory> {

Callers 15

get_arbitraryMethod · 0.45
shuffleMethod · 0.45
reserve_capacityMethod · 0.45
newMethod · 0.45
resetMethod · 0.45
computeMethod · 0.45
clearMethod · 0.45
compute_spanning_treeMethod · 0.45
computeMethod · 0.45
get_appended_spaceMethod · 0.45

Calls 1

cloneMethod · 0.45

Tested by 1

basicFunction · 0.36