If I want to unpack a tuple and pass it as arguments is there a way to do this:
//Does not compile
fn main() {
let tuple = (10, Vec::new());
foo(tuple);
}
fn foo(a: i32, b: Vec<i32>) {
//Does stuff.
}
Instead of having to do this:
fn main() {
let tuple = (10, Vec::new());
foo(tuple.0, tuple.1);
}
fn foo(a: i32, b: Vec<i32>) {
//Does stuff.
}