aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-10-02 09:07:42 +0100
committerGitHub <[email protected]>2020-10-02 09:07:42 +0100
commite535489f03901ab94a89dd2de67f35714f0c3cfc (patch)
treef3e70f9a42b29d3d01448cc298dc61a0bce04294 /crates/ide/src
parentc3bf7659b13a14541ddcff9c243c79b45bfd6829 (diff)
parent82d6cfd495c7e0f230ce1ac61e7a4297fa22f02f (diff)
Merge #6104
6104: Minor clippy performance suggestions r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
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]) =