MCPcopy Create free account
hub / github.com/ChristianSchott/boris / ref_into_enum

Function ref_into_enum

example/src/example1.rs:7–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5}
6
7fn ref_into_enum() {
8 let mut data = EnumDataTest::A(1);
9 let data_ref: &mut i32;
10 match &mut data {
11 EnumDataTest::A(x) => data_ref = x,
12 EnumDataTest::B(x) => data_ref = x,
13 }
14
15 *data_ref = 42;
16 print!("{:?}", data);
17}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected