aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src
diff options
context:
space:
mode:
authorkjeremy <[email protected]>2020-09-30 20:22:49 +0100
committerkjeremy <[email protected]>2020-09-30 20:22:49 +0100
commit82d6cfd495c7e0f230ce1ac61e7a4297fa22f02f (patch)
tree3a6fceb66786f1b6dd0bf711182b21dd6bd2280a /crates/ide/src
parent7c9ae771bca39d511a0ea7395da2b4b91b44ee12 (diff)
Minor clippy performance suggestions
Diffstat (limited to 'crates/ide/src')
-rw-r--r--crates/ide/src/link_rewrite.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide/src/link_rewrite.rs b/crates/ide/src/link_rewrite.rs
index 107787bb9..a16f90e17 100644
--- a/crates/ide/src/link_rewrite.rs
+++ b/crates/ide/src/link_rewrite.rs
@@ -120,7 +120,7 @@ fn rewrite_intra_doc_link(
120 120
121/// Try to resolve path to local documentation via path-based links (i.e. `../gateway/struct.Shard.html`). 121/// Try to resolve path to local documentation via path-based links (i.e. `../gateway/struct.Shard.html`).
122fn rewrite_url_link(db: &RootDatabase, def: ModuleDef, target: &str) -> Option<String> { 122fn rewrite_url_link(db: &RootDatabase, def: ModuleDef, target: &str) -> Option<String> {
123 if !(target.contains("#") || target.contains(".html")) { 123 if !(target.contains('#') || target.contains(".html")) {
124 return None; 124 return None;
125 } 125 }
126 126
@@ -190,7 +190,7 @@ fn strip_prefixes_suffixes(mut s: &str) -> &str {
190 prefixes.clone().for_each(|prefix| s = s.trim_start_matches(*prefix)); 190 prefixes.clone().for_each(|prefix| s = s.trim_start_matches(*prefix));
191 suffixes.clone().for_each(|suffix| s = s.trim_end_matches(*suffix)); 191 suffixes.clone().for_each(|suffix| s = s.trim_end_matches(*suffix));
192 }); 192 });
193 s.trim_start_matches("@").trim() 193 s.trim_start_matches('@').trim()
194} 194}
195 195
196static TYPES: ([&str; 7], [&str; 0]) = 196static TYPES: ([&str; 7], [&str; 0]) =