Closed
Description
In rust we have possibility to return several values in tuple. But we can't use it vice versa: to put several arguments to function in tuple. Like this:
fn main() {
sum(prepare_args());
}
fn sum(x: int, y: int) -> int {
x + y
}
fn prepare_args () -> (int, int) {
(1, 2)
}
I think it will be very usefull.
Metadata
Metadata
Assignees
Labels
No labels