MCPcopy Create free account
hub / github.com/Rust-GPU/rust-gpu / get_mut_or_default

Method get_mut_or_default

crates/rustc_codegen_spirv/src/linker/specializer.rs:988–997  ·  view source on GitHub ↗
(&mut self, i: usize)

Source from the content-addressed store, hash-verified

986 }
987
988 fn get_mut_or_default(&mut self, i: usize) -> &mut A::Item
989 where
990 A::Item: Default,
991 {
992 let needed = i + 1;
993 if self.0.len() < needed {
994 self.0.resize_with(needed, Default::default);
995 }
996 &mut self.0[i]
997 }
998}
999
1000impl<A: smallvec::Array> IntoIterator for SmallIntMap<A> {

Callers 4

andMethod · 0.80
match_ty_patMethod · 0.80
match_ty_list_patMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected