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

Function test_as_slice

src/fast.rs:477–485  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

475
476 #[test]
477 fn test_as_slice() {
478 let mut vec = FastVec::default();
479 vec.reserve(2);
480 unsafe {
481 vec.push_unchecked(1);
482 vec.push_unchecked(2);
483 }
484 assert_eq!(vec.as_slice(), [1, 2]);
485 }
486
487 const N: usize = 1000;
488 type VecT = Vec<u32>;

Callers

nothing calls this directly

Calls 2

push_uncheckedMethod · 0.80
reserveMethod · 0.45

Tested by

no test coverage detected