Skip to content

Commit ba903f3

Browse files
Resolved code smells
1 parent 06632ce commit ba903f3

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,12 @@ where
148148
}
149149

150150
// Usage
151-
fn main() {
152-
let tuple = (42, "hello", true);
153-
tuple.print_tuple();
154-
let another_tuple = ();
155-
another_tuple.print_tuple();
156-
let yet_another_tuple = ("only one element",);
157-
yet_another_tuple.print_tuple();
158-
}
151+
let tuple = (42, "hello", true);
152+
tuple.print_tuple();
153+
let another_tuple = ();
154+
another_tuple.print_tuple();
155+
let yet_another_tuple = ("only one element",);
156+
yet_another_tuple.print_tuple();
159157
```
160158

161159
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

Comments
 (0)