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

Method from

src/benches_borrowed.rs:18–27  ·  view source on GitHub ↗
(v: &'a Data)

Source from the content-addressed store, hash-verified

16
17impl<'a> From<&'a Data> for Data2<'a> {
18 fn from(v: &'a Data) -> Self {
19 Self {
20 entity: &v.entity,
21 x: v.x,
22 y: v.y,
23 item: &v.item,
24 z: v.z,
25 e: array::from_fn(|i| v.e.get(i).map(From::from).unwrap_or(DataEnum2::Bar)),
26 }
27 }
28}
29
30#[derive(Debug, PartialEq, Serialize, Deserialize)]

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected