boinkor-net / governor

A rate-limiting library for Rust (f.k.a. ratelimit_meter)

Home Page:https://github.com/boinkor-net/governor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider using `Arc::clone` in the guide instead of `.clone`

izik1 opened this issue · comments

This has precedence for being acceptable in the stdlib https://doc.rust-lang.org/std/sync/struct.Arc.html#deref-behavior
The only reason I'm making the suggestion is because of the explanation of what is being cloned.

bit of code in question:
https://github.com/antifuchs/governor/blob/b40e7947fa7ef464d1fee596abcb5bfa359c68ab/src/_guide.rs#L145-L169

That's a fantastic suggestion, thanks for noticing it & filing the issue. If you want to, I'd happily merge a PR!

I went ahead & fixed this; an updated guide should be in 0.3.3 (or 0.4.0). Thank you so much for your two bug reports!