diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2020-06-19 19:42:45 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-19 19:42:45 -0700 |
| commit | 5c9cd82454e099b368275292f214daa11541879e (patch) | |
| tree | 1ab97bb6c3fbd9e08163152541da324b002c3e72 /src/rustllvm/PassWrapper.cpp | |
| parent | 203305d09566e2924f893ed94845253da199eeab (diff) | |
| parent | db0d70e58f2a5d42e52f2540af02d14591602717 (diff) | |
| download | rust-5c9cd82454e099b368275292f214daa11541879e.tar.gz rust-5c9cd82454e099b368275292f214daa11541879e.zip | |
Rollup merge of #71899 - cuviper:try_find_map, r=dtolnay
Refactor `try_find` a little ~~This works like `find_map`, but mapping to a `Try` type. It stops when `Ok` is `Some(value)`, with an additional short-circuit on `Try::Error`. This is similar to the unstable `try_find`, but has the advantage of being able to directly return the user's `R: Try` type directly, rather than converting to `Result`.~~ (removed -- `try_find_map` was declined in review) This PR also refactors `try_find` a little to match style. The `E` type parameter was unnecessary, so it's now removed. The folding closure now has reduced parametricity on just `T = Self::Item`, rather than the whole `Self` iterator type. There's otherwise no functional change in this.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
