You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -148,14 +148,12 @@ where
148
148
}
149
149
150
150
// Usage
151
-
fnmain() {
152
-
lettuple= (42, "hello", true);
153
-
tuple.print_tuple();
154
-
letanother_tuple= ();
155
-
another_tuple.print_tuple();
156
-
letyet_another_tuple= ("only one element",);
157
-
yet_another_tuple.print_tuple();
158
-
}
151
+
lettuple= (42, "hello", true);
152
+
tuple.print_tuple();
153
+
letanother_tuple= ();
154
+
another_tuple.print_tuple();
155
+
letyet_another_tuple= ("only one element",);
156
+
yet_another_tuple.print_tuple();
159
157
```
160
158
161
159
This pattern is extensively used in libraries like [`diesel-builders`](https://github.com/LucaCappelletti94/diesel-builders/) to build complex, type-safe abstractions over tuples of varying sizes.
0 commit comments