Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove uneeded syntax #21921

Merged
merged 5 commits into from
Feb 2, 2021
Merged

Remove uneeded syntax #21921

merged 5 commits into from
Feb 2, 2021

Conversation

alexprut
Copy link
Contributor

Nitpicky Small Changes

  • Remove uneeded convertion type
  • Remove redundant type in composite literal
  • Omit explicit type where implicit
  • Remove unused redundant parenthesis

@alexprut alexprut changed the title Remove uneeded Remove uneeded syntax Nov 30, 2020
Copy link

@DGKSK8LIFE DGKSK8LIFE left a comment

Choose a reason for hiding this comment

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

LGTM

@alexprut
Copy link
Contributor Author

alexprut commented Jan 8, 2021

Given that this PR got out of sync already once, the benefit of keeping it in sync is less that the actual gains of this small syntactic sugar simplification changes.

Would you mind reviewing @fjl @karalabe @holiman 🙏 .
Otherwise feel free to close this PR. The build is also misbehaving, probably some flaky tests?

@@ -31,5 +31,5 @@ func getProcessCPUTime() int64 {
log.Warn("Failed to retrieve CPU time", "err", err)
return 0
}
return int64(usage.Utime.Sec+usage.Stime.Sec)*100 + int64(usage.Utime.Usec+usage.Stime.Usec)/10000 //nolint:unconvert
return usage.Utime.Sec + usage.Stime.Sec*100 + int64(usage.Utime.Usec+usage.Stime.Usec)/10000 //nolint:unconvert
Copy link
Member

Choose a reason for hiding this comment

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

You messed up the math, parenthesis was needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ouch, Fixed! 🙏

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

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

LGTM thx!

@karalabe karalabe added this to the 1.10.0 milestone Feb 2, 2021
@karalabe karalabe merged commit ef84da8 into ethereum:master Feb 2, 2021
@alexprut alexprut deleted the remove-uneeded branch February 2, 2021 10:05
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Dec 10, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Dec 10, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Dec 13, 2024
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this pull request Dec 16, 2024
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this pull request Dec 16, 2024
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this pull request Dec 20, 2024
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this pull request Dec 20, 2024
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this pull request Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants