diff options
| author | mo8it <mo8it@proton.me> | 2024-06-19 14:25:29 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-06-19 14:25:29 +0200 |
| commit | 0abcdeed42957ca805a3a7475fb3f14085af346e (patch) | |
| tree | ad41929b904983d40d9027c98577be51b6b87e16 /solutions | |
| parent | 532c9ebb30afa226590e68e87af11da42b598974 (diff) | |
primitive_types6 solution
Diffstat (limited to 'solutions')
| -rw-r--r-- | solutions/04_primitive_types/primitive_types6.rs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/solutions/04_primitive_types/primitive_types6.rs b/solutions/04_primitive_types/primitive_types6.rs index 4e18198..9b7c277 100644 --- a/solutions/04_primitive_types/primitive_types6.rs +++ b/solutions/04_primitive_types/primitive_types6.rs @@ -1 +1,16 @@ -// Solutions will be available before the stable release. Thank you for testing the beta version 🥰 +fn main() { + // You can optionally experiment here. +} + +#[cfg(test)] +mod tests { + #[test] + fn indexing_tuple() { + let numbers = (1, 2, 3); + + // Tuple indexing syntax. + let second = numbers.1; + + assert_eq!(second, 2, "This is not the 2nd number in the tuple!"); + } +} |
