trpl-zh-cn/listings/ch03-common-programming-concepts/no-listing-11-destructuring-tuples/src/main.rs

8 lines
112 B
Rust
Raw Normal View History

2022-02-06 16:43:51 +08:00
fn main() {
let tup = (500, 6.4, 1);
let (x, y, z) = tup;
println!("The value of y is: {}", y);
}