Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

gps: simplify x = x <op> y to x <op>= y #2028

Closed
wants to merge 1 commit into from
Closed

gps: simplify x = x <op> y to x <op>= y #2028

wants to merge 1 commit into from

Conversation

quasilyte
Copy link
Contributor

Simplify x += 1 further to x++.

Signed-off-by: Iskander Sharipov quasilyte@gmail.com

Simplify `x += 1` further to `x++`.

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
@@ -31,15 +31,15 @@ func newMetrics() *metrics {

func (m *metrics) push(name string) {
cn := m.stack[len(m.stack)-1]
m.times[cn] = m.times[cn] + time.Since(m.last)
m.times[cn] += +time.Since(m.last)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of the + before the time here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, sorry. It should be omitted. Thanks for spotting.

@kevinburke
Copy link
Collaborator

This has been merged! Closing.

@kevinburke kevinburke closed this Mar 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants