Skip to content

Commit

Permalink
Add a test in primitive_types6.rs.
Browse files Browse the repository at this point in the history
  • Loading branch information
darnuria committed Oct 4, 2020
1 parent 9b5350e commit 2919fde
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions exercises/primitive_types/primitive_types6.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
// 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.
// You can write it were ??? is so that the test passes.
// Execute `rustlings hint primitive_types6` for hints!

// I AM NOT DONE

fn main() {
#[test]
fn indexing_tuple() {
let numbers = (1, 2, 3);
println!("The second number is {}", ???);
/// Replace below ??? by tuple indexing syntax.
let second = ???;

assert_eq!(2, second
"This is not the 2nd number of the tuple numbers")
}

0 comments on commit 2919fde

Please sign in to comment.