mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
remove unnecessary lazy evaluations
This commit is contained in:
parent
7530d76f00
commit
cc80c5bd07
31 changed files with 50 additions and 51 deletions
|
@ -588,7 +588,7 @@ impl FunctionBody {
|
|||
FunctionBody::Expr(expr) => Some(expr.clone()),
|
||||
FunctionBody::Span { parent, text_range } => {
|
||||
let tail_expr = parent.tail_expr()?;
|
||||
text_range.contains_range(tail_expr.syntax().text_range()).then(|| tail_expr)
|
||||
text_range.contains_range(tail_expr.syntax().text_range()).then_some(tail_expr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue