MCPcopy Create free account
hub / github.com/bedroombuilds/python2rust / main

Function main

07_structs/rust/structs.rs:10–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8}
9
10fn main() {
11 let mut a = A { x: 1, y: 2 };
12 a.x += 2;
13 let a_updated = A { y: 4, ..a };
14 println!("a.x {} a_updated.x {}", a.x, a_updated.x);
15 println!("a.y {} a_updated.y {}", a.y, a_updated.y);
16}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected