film42 / sidekiq-rs

A port of sidekiq to rust using tokio
MIT License
95 stars 10 forks source link

remove mut requirement for RedisPool, + some lint fixes #28

Closed jondot closed 8 months ago

jondot commented 8 months ago

This removes the requirement for a mut pool (which did not make sense, and severely limited use through a web framework)

NOTE: FYI in general there are some more warnings (via lints), which indicates some of the types require Serialize and are not Send, but I left it as-is for now.

film42 commented 8 months ago

Agreed on mut prefix. I think that was a relic of the previous type. And I like the inclusion of #[must_use] . There are a few mustuse failures in CI and one code change that is required. Thoughts on making incrby / decrby not needing `let = x`?

jondot commented 8 months ago

Yea I guess I can exclude those, let me revet back and see how its done in other cases

jondot commented 8 months ago

@film42 fixed the lints, now the counter functions reflect the intent (incr, decr do not return values). The reason that they return value is because of compare-and-swap (returning the previous value), a semantic which isn't needed in this case.

film42 commented 8 months ago

Looks great. I'll get this published shortly. Thanks again, @jondot !