diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-20 17:54:57 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-20 17:54:57 +0100 |
commit | 21b4e9178fd7047f01f6d999abe6b167027263d9 (patch) | |
tree | 0fac8c81fa4940e946f6f7f1efe2af2383207b0b /crates/ra_assists/src | |
parent | 7a089a7bab3779ad83719a91f0db6ec6ccf0175b (diff) | |
parent | 17f4d27f1285a76961b2e3957dc192de8e4f179f (diff) |
Merge #5440
5440: Minor perf tweaks per clippy r=matklad a=kjeremy
Co-authored-by: Jeremy Kolb <[email protected]>
Diffstat (limited to 'crates/ra_assists/src')
-rw-r--r-- | crates/ra_assists/src/handlers/raw_string.rs | 2 | ||||
-rw-r--r-- | crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/handlers/raw_string.rs b/crates/ra_assists/src/handlers/raw_string.rs index ba1dcb610..4e8a0c2db 100644 --- a/crates/ra_assists/src/handlers/raw_string.rs +++ b/crates/ra_assists/src/handlers/raw_string.rs | |||
@@ -131,7 +131,7 @@ pub(crate) fn remove_hash(acc: &mut Assists, ctx: &AssistContext) -> Option<()> | |||
131 | let token = ctx.find_token_at_offset(RAW_STRING).and_then(ast::RawString::cast)?; | 131 | let token = ctx.find_token_at_offset(RAW_STRING).and_then(ast::RawString::cast)?; |
132 | 132 | ||
133 | let text = token.text().as_str(); | 133 | let text = token.text().as_str(); |
134 | if !text.starts_with("r#") && text.ends_with("#") { | 134 | if !text.starts_with("r#") && text.ends_with('#') { |
135 | return None; | 135 | return None; |
136 | } | 136 | } |
137 | 137 | ||
diff --git a/crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs b/crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs index dfd314abf..3d51faa54 100644 --- a/crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs +++ b/crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs | |||
@@ -106,7 +106,7 @@ fn maybe_replace_path( | |||
106 | path: ast::Path, | 106 | path: ast::Path, |
107 | target: ast::Path, | 107 | target: ast::Path, |
108 | ) -> Option<()> { | 108 | ) -> Option<()> { |
109 | if !path_eq(path.clone(), target.clone()) { | 109 | if !path_eq(path.clone(), target) { |
110 | return None; | 110 | return None; |
111 | } | 111 | } |
112 | 112 | ||