Closed max-heller closed 4 months ago
Currently, RateLimiter constructors take in a reference to a Clock and immediately clone it: https://github.com/boinkor-net/governor/blob/be3ae0878968fd869b17e4fee871127abad5bae5/governor/src/state.rs#L80-L83
RateLimiter
Clock
The Clone bound on Clock isn't used anywhere else, so the constructors could be changed to take a Clock directly and the Clock: Clone bound could be removed--this would make the API more flexible and allow non-Clone clocks
Clone
Clock: Clone
Oh. Oh!! Yes, I love that idea. Do you want to submit a PR for it? (:
Currently,
RateLimiter
constructors take in a reference to aClock
and immediately clone it: https://github.com/boinkor-net/governor/blob/be3ae0878968fd869b17e4fee871127abad5bae5/governor/src/state.rs#L80-L83The
Clone
bound onClock
isn't used anywhere else, so the constructors could be changed to take aClock
directly and theClock: Clone
bound could be removed--this would make the API more flexible and allow non-Clone
clocks