This repository has been archived on 2023-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
2018-11-09 13:31:14 -06:00
|
|
|
// primitive_types5.rs
|
|
|
|
// Destructure the `cat` tuple so that the println will work.
|
2022-07-12 07:54:12 -05:00
|
|
|
// Execute `rustlings hint primitive_types5` or use the `hint` watch subcommand for a hint.
|
2018-11-09 13:31:14 -06:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let cat = ("Furry McFurson", 3.5);
|
2023-03-24 16:18:51 -05:00
|
|
|
let (name, age) = cat;
|
2018-11-09 13:31:14 -06:00
|
|
|
|
|
|
|
println!("{} is {} years old.", name, age);
|
|
|
|
}
|