]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #58064 - llogiq:vec-deque-try-rfold, r=scottmcm
authorMazdak Farrokhzad <twingoow@gmail.com>
Fri, 22 Feb 2019 13:57:58 +0000 (14:57 +0100)
committerGitHub <noreply@github.com>
Fri, 22 Feb 2019 13:57:58 +0000 (14:57 +0100)
commit70cc6c980cb4540d05a628f492d365ae422fa22f
tree4156d0969c9f943778c91bca6930356fec70bc72
parentec8ef1836af5dbc8df91989de4ae6a9bd6664178
parent64c915e3ade66d3335c445eed89509dc41502c13
Rollup merge of #58064 - llogiq:vec-deque-try-rfold, r=scottmcm

override `VecDeque::try_rfold`, also update iterator

This keeps the slice based iteration and updates the iterator state after each slice. It also uses a loop to reduce the amount of code.

This uses unsafe code, so some thorough review would be appreciated. Cc @RalfJung
src/liballoc/collections/vec_deque.rs
src/liballoc/tests/vec_deque.rs