diff options
| author | bors <bors@rust-lang.org> | 2020-01-02 10:20:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-01-02 10:20:09 +0000 |
| commit | 0a58f5864659ddfe1d95c122abaa75c88220aed0 (patch) | |
| tree | 7b1e39ae2d96c2bb0cede5e9349136abf604d87d /src/test/ui/const-generics/array-size-in-generic-struct-param.rs | |
| parent | 766fba3fdca8fe075c370a63d2f76f8407483af5 (diff) | |
| parent | 5446cc99bb2a50bfed05bd781e9d72790a9ff570 (diff) | |
| download | rust-0a58f5864659ddfe1d95c122abaa75c88220aed0.tar.gz rust-0a58f5864659ddfe1d95c122abaa75c88220aed0.zip | |
Auto merge of #63177 - MOZGIII:find-result, r=Amanieu
Add Iterator::try_find I found a need for this fn, and created this PR. Tracking issue: #63178 I did a fair amount of thinking about the function name, and settled on the current one. I don't see other anything else that's non-trivial here, but I'm open for debate. I just want this functionality to be there. It couples with the `collect` trick for collecting `Result<Vec<T>, E>` from `Iterator<Item = Result<T, E>>`. UPD: I've already looked at `fallible_iterator` crate, but I don't think it supports my use case. The main problem is that I can't construct a failable iterator. I have a regular iterator, and I just need to apply a predicate that can fail via `find` method. UPD: `fallible_iterator` would work, but it's not elegant cause I'd have to make a failable iterator by mapping iterator with `Result::Ok` first.
Diffstat (limited to 'src/test/ui/const-generics/array-size-in-generic-struct-param.rs')
0 files changed, 0 insertions, 0 deletions
