fix clippy::{needless_bool, manual_unwrap_or}

This commit is contained in:
Matthias Krüger 2020-12-11 18:08:05 +01:00
parent db6c50998c
commit b7795e135a
5 changed files with 17 additions and 29 deletions

View file

@ -1109,10 +1109,7 @@ impl Session {
}
pub fn link_dead_code(&self) -> bool {
match self.opts.cg.link_dead_code {
Some(explicitly_set) => explicitly_set,
None => false,
}
self.opts.cg.link_dead_code.unwrap_or(false)
}
pub fn mark_attr_known(&self, attr: &Attribute) {