trpl-zh-cn/listings/ch18-patterns-and-matching/no-listing-05-destructuring-structs-and-tuples/src/main.rs
2022-02-06 16:43:51 +08:00

11 lines
194 B
Rust
Executable File

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
}