We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9598cf4 + cc4ced8 commit 089a894Copy full SHA for 089a894
src/librustc_lint/unused.rs
@@ -357,8 +357,7 @@ impl UnusedParens {
357
if !Self::is_expr_parens_necessary(inner, followed_by_block) &&
358
value.attrs.is_empty() &&
359
!MultiSpan::from(value.span).primary_span()
360
- .map(|span| span.from_expansion())
361
- .unwrap_or(false)
+ .map_or(false, |span| span.from_expansion())
362
{
363
let expr_text = if let Ok(snippet) = cx.sess().source_map()
364
.span_to_snippet(value.span) {
0 commit comments