Use if let chain.
This commit is contained in:
parent
e65c96e4ad
commit
df7fd119d2
1 changed files with 2 additions and 4 deletions
|
@ -236,10 +236,8 @@ pub fn make_format_args(
|
||||||
if let Some(note) = err.note {
|
if let Some(note) = err.note {
|
||||||
e.note(¬e);
|
e.note(¬e);
|
||||||
}
|
}
|
||||||
if let Some((label, span)) = err.secondary_label {
|
if let Some((label, span)) = err.secondary_label && is_literal {
|
||||||
if is_literal {
|
e.span_label(fmt_span.from_inner(InnerSpan::new(span.start, span.end)), label);
|
||||||
e.span_label(fmt_span.from_inner(InnerSpan::new(span.start, span.end)), label);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if err.should_be_replaced_with_positional_argument {
|
if err.should_be_replaced_with_positional_argument {
|
||||||
let captured_arg_span =
|
let captured_arg_span =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue