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

Method with_capacity

cranelift/codegen/src/ranges.rs:17–21  ·  view source on GitHub ↗

Constructs a new, empty, list of ranges with at least the specified capacity.

(capacity: usize)

Source from the content-addressed store, hash-verified

15 /// Constructs a new, empty, list of ranges with at least the
16 /// specified capacity.
17 pub fn with_capacity(capacity: usize) -> Self {
18 let mut new = Ranges::default();
19 new.reserve(capacity);
20 new
21 }
22
23 /// Add a new range which begins at the end of the previous range
24 /// and ends at the specified offset, exclusive.

Callers

nothing calls this directly

Calls 1

reserveMethod · 0.45

Tested by

no test coverage detected