Skip to content

Instantly share code, notes, and snippets.

@georgematos
Last active May 2, 2024 14:24
Show Gist options
  • Save georgematos/69f0aa2a2c1eebb8238bce9a934397fb to your computer and use it in GitHub Desktop.
Save georgematos/69f0aa2a2c1eebb8238bce9a934397fb to your computer and use it in GitHub Desktop.
Rust - destructuring (tuple exemple) sample
// destructure
fn main() {
let tuple: (i32, f64, String) = (500, 38.8, "Rust".to_string());
let (a, b, c) = tuple;
println!("content: {a}, {b}, {c}")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment