Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored while_some (libstd/option.rs)
The old 'while' needed to match 2 times for each iteration. With the new 'loop' there is just one match needed. I have also replaced 'blk' by 'f' to be more consistent with parameter names in other functions that are implemented for Option
- Loading branch information
6ff207b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from alexcrichton
at https://github.com/aochagavia/rust/commit/6ff207b415233072bff2efb4b7b0f5fe883348e5
6ff207b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging aochagavia/rust/Optimize-while_some = 6ff207b into auto
6ff207b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aochagavia/rust/Optimize-while_some = 6ff207b merged ok, testing candidate = d367482
6ff207b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/4748
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/3836
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/3842
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/4750
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/3836
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/3841
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/3909
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/4746
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/3848
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/3854
success: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/4509
6ff207b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = d367482