1
0
Fork 0
mirror of https://github.com/rust-lang/rustlings.git synced 2024-05-26 05:46:07 +02:00
rustlings/exercises/primitive_types/primitive_types6.rs
Roberto Vidal 2cdd61294f feat: improve `watch` execution mode
The `watch` command now requires user action to move to the next
exercise.

BREAKING CHANGE: this changes the behavior of `watch`.
2019-11-11 16:23:35 +01:00

48 lines
626 B
Rust

// primitive_types6.rs
// Use a tuple index to access the second element of `numbers`.
// You can put this right into the `println!` where the ??? is.
// Scroll down for hints!
// I AM NOT DONE
fn main() {
let numbers = (1, 2, 3);
println!("The second number is {}", ???);
}
// While you could use a destructuring `let` for the tuple here, try
// indexing into it instead, as explained in the last example of the
// Data Types -> The Tuple Type section of the book:
// https://doc.rust-lang.org/book/ch03-02-data-types.html#the-tuple-type
// Now you have another tool in your toolbox!