MCPcopy Create free account
hub / github.com/Amanieu/regalloc3 / is_valid

Method is_valid

src/entity/primary_map.rs:62–64  ·  view source on GitHub ↗

Check if `k` is a valid key in the map.

(&self, k: K)

Source from the content-addressed store, hash-verified

60
61 /// Check if `k` is a valid key in the map.
62 pub fn is_valid(&self, k: K) -> bool {
63 k.index() < self.elems.len()
64 }
65
66 /// Get the element at `k` if it exists.
67 pub fn get(&self, k: K) -> Option<&V> {

Callers

nothing calls this directly

Calls 2

indexMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected