diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2018-12-05 23:54:25 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-05 23:54:25 +0100 |
| commit | 64371f1cfee8d5ec8552ac8ee4cbdb4cd2629b91 (patch) | |
| tree | 87bdf3cb911fbad454292ca3383bfa6f772f3c5c /src/test | |
| parent | 1594a4245ba9951039bb39bf5e3484605ab5d068 (diff) | |
| parent | 9012af6f19d999869824e3b933de5f7b30986877 (diff) | |
| download | rust-64371f1cfee8d5ec8552ac8ee4cbdb4cd2629b91.tar.gz rust-64371f1cfee8d5ec8552ac8ee4cbdb4cd2629b91.zip | |
Rollup merge of #56119 - frewsxcv:frewsxcv-option-carrier, r=TimNN
Utilize `?` instead of `return None`. None
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/impl-trait/example-calendar.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/test/run-pass/impl-trait/example-calendar.rs b/src/test/run-pass/impl-trait/example-calendar.rs index e6dd421f48f..7373828427e 100644 --- a/src/test/run-pass/impl-trait/example-calendar.rs +++ b/src/test/run-pass/impl-trait/example-calendar.rs @@ -753,10 +753,7 @@ where It: Iterator { type Item = Vec<It::Item>; fn next(&mut self) -> Option<Vec<It::Item>> { - let first = match self.it.next() { - Some(e) => e, - None => return None - }; + let first = self.it.next()?; let mut result = Vec::with_capacity(self.n); result.push(first); |
