You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make retriable request functions Fn instead of FnMut
At the time I wrote this code I didn't realize that plain `Fn` existed
and thought the only two options were `FnOnce` (which I couldn't use
since the function is called more than once) and the previously used
`FnMut`. This brought the problem that, because the function could
mutate state (which we never used outside of the tests), it had to be
wrapped in an `Arc<Mutex<_>>`, which was quite ugly.
This makes the tests a tad messier since they have to use synchronized
operations to keep track of the attempt count now, but it's not too bad
and isolated solely to the test code.
Signed-off-by: Ryan Gonzalez <[email protected]>
0 commit comments