diff options
author | Maan2003 <[email protected]> | 2021-06-13 04:54:16 +0100 |
---|---|---|
committer | Maan2003 <[email protected]> | 2021-06-13 04:54:16 +0100 |
commit | c9b4ac5be4daaabc062ab1ee663eba8594750003 (patch) | |
tree | 6090c8c38c735875c916255920525cf5fff45c75 /crates/ide_assists/src/handlers/early_return.rs | |
parent | d6737e55fb49d286b5e646f57975b27b2c95ce92 (diff) |
clippy::redudant_borrow
Diffstat (limited to 'crates/ide_assists/src/handlers/early_return.rs')
-rw-r--r-- | crates/ide_assists/src/handlers/early_return.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide_assists/src/handlers/early_return.rs b/crates/ide_assists/src/handlers/early_return.rs index 5eb6a57f0..ef4a7cb50 100644 --- a/crates/ide_assists/src/handlers/early_return.rs +++ b/crates/ide_assists/src/handlers/early_return.rs | |||
@@ -108,7 +108,7 @@ pub(crate) fn convert_to_guarded_return(acc: &mut Assists, ctx: &AssistContext) | |||
108 | "Convert to guarded return", | 108 | "Convert to guarded return", |
109 | target, | 109 | target, |
110 | |edit| { | 110 | |edit| { |
111 | let if_indent_level = IndentLevel::from_node(&if_expr.syntax()); | 111 | let if_indent_level = IndentLevel::from_node(if_expr.syntax()); |
112 | let new_block = match if_let_pat { | 112 | let new_block = match if_let_pat { |
113 | None => { | 113 | None => { |
114 | // If. | 114 | // If. |
@@ -174,7 +174,7 @@ pub(crate) fn convert_to_guarded_return(acc: &mut Assists, ctx: &AssistContext) | |||
174 | .take_while(|i| *i != end_of_then), | 174 | .take_while(|i| *i != end_of_then), |
175 | ); | 175 | ); |
176 | replace_children( | 176 | replace_children( |
177 | &parent_block.syntax(), | 177 | parent_block.syntax(), |
178 | RangeInclusive::new( | 178 | RangeInclusive::new( |
179 | if_expr.clone().syntax().clone().into(), | 179 | if_expr.clone().syntax().clone().into(), |
180 | if_expr.syntax().clone().into(), | 180 | if_expr.syntax().clone().into(), |