1
Fork 0

Rollup merge of #89649 - matthiaskrgr:clippycompl, r=jyn514

clippy::complexity fixes
This commit is contained in:
Guillaume Gomez 2021-10-08 22:30:40 +02:00 committed by GitHub
commit 836597a881
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 23 additions and 30 deletions

View file

@ -363,7 +363,7 @@ impl Collector<'tcx> {
.collect::<Vec<_>>();
if existing.is_empty() {
// Add if not found
let new_name = passed_lib.new_name.as_ref().map(|s| &**s); // &Option<String> -> Option<&str>
let new_name: Option<&str> = passed_lib.new_name.as_deref();
let lib = NativeLib {
name: Some(Symbol::intern(new_name.unwrap_or(&passed_lib.name))),
kind: passed_lib.kind,