mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
remove redundant clone()s
This commit is contained in:
parent
5ecace48f6
commit
2a8edaa14d
8 changed files with 17 additions and 17 deletions
|
@ -37,7 +37,7 @@ pub(crate) fn remove_unnecessary_else(
|
|||
fn fixes(ctx: &DiagnosticsContext<'_>, d: &RemoveUnnecessaryElse) -> Option<Vec<Assist>> {
|
||||
let root = ctx.sema.db.parse_or_expand(d.if_expr.file_id);
|
||||
let if_expr = d.if_expr.value.to_node(&root);
|
||||
let if_expr = ctx.sema.original_ast_node(if_expr.clone())?;
|
||||
let if_expr = ctx.sema.original_ast_node(if_expr)?;
|
||||
|
||||
let mut indent = IndentLevel::from_node(if_expr.syntax());
|
||||
let has_parent_if_expr = if_expr.syntax().parent().and_then(ast::IfExpr::cast).is_some();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue