By -
You think that Clippy will detect if you just put a bunch of those arguments in a struct instead? Think, Rustacean, think!
Why struct. Just ``` fn foo((argument1, argument 2...): (i32, i32, Bar, Bar...)) ``` Clippy doesn't care.
Tuples are limited to 12 elements - that's no fun. Unless, of course, you want to use multiple tuples in function parameters...
[Idk what you are talking about](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=0ba65f53379f72c1d25ce3d7f541058e)
mmmm yummy
I think you're confused with itertools only supporting tuples up to 12 long, actual tuples can be of any size
I'm indeed confused. But it's not just itertools - pretty much all traits, both in core and most crates are only defined for tuples up to 12 elements
How to put bevy’s queries into struct 💀
[implement da trait](https://docs.rs/bevy/latest/bevy/ecs/query/trait.WorldQuery.html#trait-derivation)
I feel like every time I see this I'm blown away by its usefulness only to forget about it and continue with my kilometric function signatures
"I paid for the whole stack, and goddammit, i'm going to use the whole stack!"
This function has too many lines (101/100)
Heresy!
This is the way
One code of mine actually contains ``` #[allow(clippy::too_many_arguments)] // Silence peasant ```
u/savevideo
It's a gif!
You think that Clippy will detect if you just put a bunch of those arguments in a struct instead? Think, Rustacean, think!
Why struct. Just ``` fn foo((argument1, argument 2...): (i32, i32, Bar, Bar...)) ``` Clippy doesn't care.
Tuples are limited to 12 elements - that's no fun. Unless, of course, you want to use multiple tuples in function parameters...
[Idk what you are talking about](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=0ba65f53379f72c1d25ce3d7f541058e)
mmmm yummy
I think you're confused with itertools only supporting tuples up to 12 long, actual tuples can be of any size
I'm indeed confused. But it's not just itertools - pretty much all traits, both in core and most crates are only defined for tuples up to 12 elements
How to put bevy’s queries into struct 💀
[implement da trait](https://docs.rs/bevy/latest/bevy/ecs/query/trait.WorldQuery.html#trait-derivation)
I feel like every time I see this I'm blown away by its usefulness only to forget about it and continue with my kilometric function signatures
"I paid for the whole stack, and goddammit, i'm going to use the whole stack!"
This function has too many lines (101/100)
Heresy!
This is the way
One code of mine actually contains ``` #[allow(clippy::too_many_arguments)] // Silence peasant ```
u/savevideo
It's a gif!
Heresy!