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

Method from

src/fast.rs:41–47  ·  view source on GitHub ↗
(fast: FastVec<T>)

Source from the content-addressed store, hash-verified

39
40impl<T> From<FastVec<T>> for Vec<T> {
41 fn from(fast: FastVec<T>) -> Self {
42 let start = fast.start;
43 let length = fast.len();
44 let capacity = sub_ptr(fast.capacity, fast.start);
45 std::mem::forget(fast);
46 unsafe { Vec::from_raw_parts(start, length, capacity) }
47 }
48}
49
50impl<T> From<Vec<T>> for FastVec<T> {

Callers

nothing calls this directly

Calls 3

sub_ptrFunction · 0.85
as_ptrMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected