Skip to content

Commit de9eb29

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

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

Diff for: github/github.go

-2
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)