diff options
Diffstat (limited to 'crates/ide')
-rw-r--r-- | crates/ide/src/link_rewrite.rs | 4 |
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`). |
122 | fn rewrite_url_link(db: &RootDatabase, def: ModuleDef, target: &str) -> Option<String> { | 122 | fn 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 | ||
196 | static TYPES: ([&str; 7], [&str; 0]) = | 196 | static TYPES: ([&str; 7], [&str; 0]) = |