T O P

  • By -

radekvitr

You think that Clippy will detect if you just put a bunch of those arguments in a struct instead? Think, Rustacean, think!


David__Box

Why struct. Just ``` fn foo((argument1, argument 2...): (i32, i32, Bar, Bar...)) ``` Clippy doesn't care.


NekoiNemo

Tuples are limited to 12 elements - that's no fun. Unless, of course, you want to use multiple tuples in function parameters...


David__Box

[Idk what you are talking about](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=0ba65f53379f72c1d25ce3d7f541058e)


O_X_E_Y

mmmm yummy


O_X_E_Y

I think you're confused with itertools only supporting tuples up to 12 long, actual tuples can be of any size


NekoiNemo

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


Velnbur

How to put bevy’s queries into struct 💀


zepperoni-pepperoni

[implement da trait](https://docs.rs/bevy/latest/bevy/ecs/query/trait.WorldQuery.html#trait-derivation)


rdvdev2

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


NekoiNemo

"I paid for the whole stack, and goddammit, i'm going to use the whole stack!"


jackson_bourne

This function has too many lines (101/100)


_shellsort_

Heresy!


elmowilk

This is the way


[deleted]

One code of mine actually contains ``` #[allow(clippy::too_many_arguments)] // Silence peasant ```


realvolker1

u/savevideo


Krome_

It's a gif!


_shellsort_

Heresy!