Skip to content

Commit

Permalink
Remove unused Client.mostRecent. (google#559)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dmitshur authored Feb 18, 2017
1 parent 870ac2e commit bcf9cc9
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ type Client struct {

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

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

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

c.rateMu.Lock()
c.rateLimits[rateLimitCategory] = response.Rate
c.mostRecent = rateLimitCategory
c.rateMu.Unlock()

err = CheckResponse(resp)
Expand Down

0 comments on commit bcf9cc9

Please sign in to comment.