mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-05-01 18:58:44 +08:00
16 lines
252 B
Rust
16 lines
252 B
Rust
fn main() {
|
|
// ANCHOR: here
|
|
struct Point {
|
|
x: i32,
|
|
y: i32,
|
|
z: i32,
|
|
}
|
|
|
|
let origin = Point { x: 0, y: 0, z: 0 };
|
|
|
|
match origin {
|
|
Point { x, .. } => println!("x is {x}"),
|
|
}
|
|
// ANCHOR_END: here
|
|
}
|