Skip to content

Commit c34dcac

Browse files
authored
Remove unused Client.mostRecent.
This is a followup to #555. mostRecent was created specifically to support Rate method in #347. That method is now gone (removed in #555), so mostRecent is unused and can be safely removed.
1 parent 2a4b920 commit c34dcac

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

github/github.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ type Client struct {
114114

115115
rateMu sync.Mutex
116116
rateLimits [categories]Rate // Rate limits for the client as determined by the most recent API calls.
117-
mostRecent rateLimitCategory
118117

119118
common service // Reuse a single struct instead of allocating one for each service on the heap.
120119

@@ -413,7 +412,6 @@ func (c *Client) Do(req *http.Request, v interface{}) (*Response, error) {
413412

414413
c.rateMu.Lock()
415414
c.rateLimits[rateLimitCategory] = response.Rate
416-
c.mostRecent = rateLimitCategory
417415
c.rateMu.Unlock()
418416

419417
err = CheckResponse(resp)

0 commit comments

Comments
 (0)