1
Fork 0
rust/compiler/rustc_metadata/src
Yuki Okushi 598d189e9b
Rollup merge of #80643 - LingMan:unwrap, r=oli-obk
Move variable into the only branch where it is relevant

At the `if` branch `filter` (the `let` binding) is `None` iff `filter` (the parameter) was `None`.
We can branch on the parameter, move the binding into the `if`, and the complexity of handling
`Option<Option<_>` largely dissolves.

`@rustbot` modify labels +C-cleanup +T-compiler

Note: I have no idea how hot this code is. If this method frequently gets called with a `None` filter, there might be a small perf improvement.
2021-01-05 09:52:44 +09:00
..
dynamic_lib mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
rmeta Rollup merge of #80643 - LingMan:unwrap, r=oli-obk 2021-01-05 09:52:44 +09:00
creader.rs Improve warnings on incompatible options involving -Zinstrument-coverage 2020-12-14 12:55:46 -08:00
dependency_format.rs Collapse all uses of target.options.foo into target.foo 2020-11-08 17:29:13 +03:00
dynamic_lib.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
foreign_modules.rs Remove ForeignMod struct. 2020-11-26 21:32:27 +01:00
lib.rs Stabilise then 2020-11-22 13:45:14 +00:00
link_args.rs Remove ForeignMod struct. 2020-11-26 21:32:27 +01:00
locator.rs Collapse all uses of target.options.foo into target.foo 2020-11-08 17:29:13 +03:00
native_libs.rs reduce borrowing and (de)referencing around match patterns (clippy::match_ref_pats) 2021-01-02 20:09:17 +01:00