trpl-zh-cn/listings/ch19-patterns-and-matching/no-listing-05-destructuring-structs-and-tuples/src/main.rs
2024-10-20 23:44:05 +08:00

11 lines
194 B
Rust

fn main() {
struct Point {
x: i32,
y: i32,
}
// ANCHOR: here
let ((feet, inches), Point { x, y }) = ((3, 10), Point { x: 3, y: -10 });
// ANCHOR_END: here
}