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/librustc_incremental | |
| 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/librustc_incremental')
| -rw-r--r-- | src/librustc_incremental/persist/work_product.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/librustc_incremental/persist/work_product.rs b/src/librustc_incremental/persist/work_product.rs index cfe59b1f672..ddd28eb5393 100644 --- a/src/librustc_incremental/persist/work_product.rs +++ b/src/librustc_incremental/persist/work_product.rs @@ -29,7 +29,7 @@ pub fn copy_cgu_workproducts_to_incr_comp_cache_dir( return None } - let saved_files: Option<Vec<_>> = + let saved_files = files.iter() .map(|&(kind, ref path)| { let extension = match kind { @@ -51,11 +51,7 @@ pub fn copy_cgu_workproducts_to_incr_comp_cache_dir( } } }) - .collect(); - let saved_files = match saved_files { - None => return None, - Some(v) => v, - }; + .collect::<Option<Vec<_>>>()?; let work_product = WorkProduct { cgu_name: cgu_name.to_string(), |
