MCPcopy Index your code
hub / github.com/RustPython/RustPython / vec_into_f64

Method vec_into_f64

crates/vm/src/function/number.rs:67–73  ·  view source on GitHub ↗
(v: Vec<Self>)

Source from the content-addressed store, hash-verified

65 }
66
67 pub fn vec_into_f64(v: Vec<Self>) -> Vec<f64> {
68 // TODO: Vec::into_raw_parts once stabilized
69 let mut v = core::mem::ManuallyDrop::new(v);
70 let (p, l, c) = (v.as_mut_ptr(), v.len(), v.capacity());
71 // SAFETY: IntoPyFloat is repr(transparent) over f64
72 unsafe { Vec::from_raw_parts(p.cast(), l, c) }
73 }
74}
75
76impl From<ArgIntoFloat> for f64 {

Callers

nothing calls this directly

Calls 5

newFunction · 0.85
as_mut_ptrMethod · 0.80
lenMethod · 0.45
capacityMethod · 0.45
castMethod · 0.45

Tested by

no test coverage detected