MCPcopy Create free account
hub / github.com/SoftbearStudios/bitcode / default_box_slice

Function default_box_slice

src/serde/mod.rs:20–24  ·  view source on GitHub ↗
(len: usize)

Source from the content-addressed store, hash-verified

18use type_changed;
19
20fn default_box_slice<T: Default>(len: usize) -> Box<[T]> {
21 let mut vec = vec![];
22 vec.resize_with(len, Default::default);
23 vec.into()
24}
25
26#[inline(always)]
27fn get_mut_or_resize<T: Default>(vec: &mut Vec<T>, index: usize) -> &mut T {

Callers 3

collectMethod · 0.85
coldMethod · 0.85
coldMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected