diff options
author | Shotaro Yamada <[email protected]> | 2019-09-25 02:32:01 +0100 |
---|---|---|
committer | Shotaro Yamada <[email protected]> | 2019-09-25 02:32:01 +0100 |
commit | 9c45a9e58632966984a79e18aa5221efb65e0ead (patch) | |
tree | c3c2af75fa7be376506bf0ffe23fe8cad9c6c402 /crates/ra_assists/src | |
parent | 7e0fa715329571da8d5d551b1815303c39cf51c1 (diff) |
Remove redundant clone()
Diffstat (limited to 'crates/ra_assists/src')
-rw-r--r-- | crates/ra_assists/src/merge_match_arms.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_assists/src/merge_match_arms.rs b/crates/ra_assists/src/merge_match_arms.rs index 225a48d3a..3b6a99895 100644 --- a/crates/ra_assists/src/merge_match_arms.rs +++ b/crates/ra_assists/src/merge_match_arms.rs | |||
@@ -8,7 +8,7 @@ pub(crate) fn merge_match_arms(mut ctx: AssistCtx<impl HirDatabase>) -> Option<A | |||
8 | // We check if the following match arm matches this one. We could, but don't, | 8 | // We check if the following match arm matches this one. We could, but don't, |
9 | // compare to the previous match arm as well. | 9 | // compare to the previous match arm as well. |
10 | let next = current_arm.syntax().next_sibling(); | 10 | let next = current_arm.syntax().next_sibling(); |
11 | let next_arm = MatchArm::cast(next?.clone())?; | 11 | let next_arm = MatchArm::cast(next?)?; |
12 | 12 | ||
13 | // Don't try to handle arms with guards for now - can add support for this later | 13 | // Don't try to handle arms with guards for now - can add support for this later |
14 | if current_arm.guard().is_some() || next_arm.guard().is_some() { | 14 | if current_arm.guard().is_some() || next_arm.guard().is_some() { |