We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd4886c commit b2c5574Copy full SHA for b2c5574
Function/FunctionWithTupleReturn.rs
@@ -0,0 +1,8 @@
1
+fn main() {
2
+ let (x, y) = swap(10, 20);
3
+ println!("Swapped: x={}, y={}", x, y);
4
+}
5
+
6
+fn swap(a: i32, b: i32) -> (i32, i32) {
7
+ (b, a)
8
0 commit comments