rustlings

solving rustlings ft. dracuxan
git clone [email protected]:dracuxan/rustlings.git
Log | Files | Refs

primitive_types6.rs (305B)


      1 fn main() {
      2     // You can optionally experiment here.
      3 }
      4 
      5 #[cfg(test)]
      6 mod tests {
      7     #[test]
      8     fn indexing_tuple() {
      9         let numbers = (1, 2, 3);
     10 
     11         // Tuple indexing syntax.
     12         let second = numbers.1;
     13 
     14         assert_eq!(second, 2, "This is not the 2nd number in the tuple!");
     15     }
     16 }