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

Prefer is_and_then and is_ok_than over map_or #10408

Merged
merged 2 commits into from
Jan 15, 2024
Merged

Prefer is_and_then and is_ok_than over map_or #10408

merged 2 commits into from
Jan 15, 2024

Conversation

mina86
Copy link
Contributor

@mina86 mina86 commented Jan 11, 2024

Option::is_and_then and Result::is_ok_then have been stabilised
in 1.70 and are slightly more concise and arguably more descriptive
than map_or.

Option::is_and_then and Result::is_ok_then have been stabilised
in 1.70 and are slightly more concise and arguably more descriptive
than map_or.
@mina86 mina86 requested a review from a team as a code owner January 11, 2024 12:44
@mina86 mina86 requested a review from wacban January 11, 2024 12:44
Copy link

codecov bot commented Jan 11, 2024

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (84f3d28) 71.88% compared to head (02b1149) 71.88%.

Files Patch % Lines
nearcore/src/lib.rs 0.00% 1 Missing ⚠️
...me/near-vm-runner/src/instrument/gas/validation.rs 0.00% 1 Missing ⚠️
runtime/near-vm-runner/src/prepare/prepare_v0.rs 0.00% 0 Missing and 1 partial ⚠️
runtime/near-vm-runner/src/prepare/prepare_v1.rs 0.00% 0 Missing and 1 partial ⚠️
tools/state-viewer/src/rocksdb_stats.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10408      +/-   ##
==========================================
- Coverage   71.88%   71.88%   -0.01%     
==========================================
  Files         719      719              
  Lines      144841   144837       -4     
  Branches   144841   144837       -4     
==========================================
- Hits       104122   104119       -3     
+ Misses      35957    35956       -1     
  Partials     4762     4762              
Flag Coverage Δ
backward-compatibility 0.08% <0.00%> (ø)
db-migration 0.08% <0.00%> (ø)
genesis-check 1.25% <0.00%> (ø)
integration-tests 36.68% <50.00%> (+<0.01%) ⬆️
linux 71.43% <72.22%> (+0.01%) ⬆️
linux-nightly 71.46% <72.22%> (-0.01%) ⬇️
macos 53.68% <13.33%> (+<0.01%) ⬆️
pytests 1.48% <0.00%> (ø)
sanity-checks 1.27% <0.00%> (ø)
unittests 68.12% <72.22%> (+<0.01%) ⬆️
upgradability 0.13% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Contributor

@wacban wacban left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@nagisa nagisa added this pull request to the merge queue Jan 15, 2024
Merged via the queue into near:master with commit a0386b1 Jan 15, 2024
23 of 24 checks passed
@mina86 mina86 deleted the a branch January 15, 2024 23:17
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.

3 participants