Skip to content

Commit

Permalink
Rollup merge of #65650 - guanqun:use-unwrap-or, r=eddyb
Browse files Browse the repository at this point in the history
use unwrap_or in lint code
  • Loading branch information
JohnTitor authored Oct 21, 2019
2 parents bcc59ac + 642da6e commit 865e46b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/librustc/lint/levels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,7 @@ impl<'a> LintLevelsBuilder<'a> {
let meta = unwrap_or!(attr.meta(), continue);
attr::mark_used(attr);

let mut metas = if let Some(metas) = meta.meta_item_list() {
metas
} else {
continue;
};
let mut metas = unwrap_or!(meta.meta_item_list(), continue);

if metas.is_empty() {
// FIXME (#55112): issue unused-attributes lint for `#[level()]`
Expand Down

0 comments on commit 865e46b

Please sign in to comment.