about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2021-01-05 09:52:44 +0900
committerGitHub <noreply@github.com>2021-01-05 09:52:44 +0900
commit598d189e9bc99be0808b41c9427490a12cdf930d (patch)
tree13e98185c931d7c432c541ed8a4e275468fad1d0 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentfaf8beddef859bbb387a24c536505d833c3821a5 (diff)
parentaf7134e7de793ea3bba30bc350daef76ea9de755 (diff)
downloadrust-598d189e9bc99be0808b41c9427490a12cdf930d.tar.gz
rust-598d189e9bc99be0808b41c9427490a12cdf930d.zip
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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions