Skip to content

feat: use the built-in max/min to simplify the code#755

Merged
ptrus merged 1 commit intooasisprotocol:mainfrom
pingshuijie:main
Jul 29, 2025
Merged

feat: use the built-in max/min to simplify the code#755
ptrus merged 1 commit intooasisprotocol:mainfrom
pingshuijie:main

Conversation

@pingshuijie
Copy link
Copy Markdown
Contributor

In Go 1.21, the standard library includes built-in max/min function, which can greatly simplify the code.

@pingshuijie pingshuijie requested review from kostko and ptrus as code owners July 22, 2025 11:10
@ptrus
Copy link
Copy Markdown
Member

ptrus commented Jul 22, 2025

Thanks, looks good. Please just update the commit message to match the guidelines.

e.g.
feat: use the built-in max/min to simplify the code

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 22, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 61.02%. Comparing base (3fbffc5) to head (ee52a06).
⚠️ Report is 21 commits behind head on main.

Files with missing lines Patch % Lines
rpc/eth/api.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #755      +/-   ##
==========================================
+ Coverage   60.94%   61.02%   +0.08%     
==========================================
  Files          40       40              
  Lines        4404     4416      +12     
==========================================
+ Hits         2684     2695      +11     
  Misses       1492     1492              
- Partials      228      229       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pingshuijie pingshuijie changed the title refactor: use the built-in max/min to simplify the code feat: use the built-in max/min to simplify the code Jul 29, 2025
@pingshuijie
Copy link
Copy Markdown
Contributor Author

Thanks, looks good. Please just update the commit message to match the guidelines.

e.g. feat: use the built-in max/min to simplify the code

Thank you for your guidance; I have made the fixes. Please review again.

Signed-off-by: pingshuijie <pingshuijie@outlook.com>
@ptrus ptrus merged commit 318aa53 into oasisprotocol:main Jul 29, 2025
6 of 8 checks passed
@ptrus
Copy link
Copy Markdown
Member

ptrus commented Jul 29, 2025

Thanks!

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.

2 participants