diff options
author | Edwin Cheng <[email protected]> | 2019-12-18 03:36:10 +0000 |
---|---|---|
committer | Edwin Cheng <[email protected]> | 2019-12-18 03:36:10 +0000 |
commit | 2ea1cfd7804dd57d63196e71f66c22e56cfd79a8 (patch) | |
tree | 03d6396cb4536513807932c5de69b9f2cf1b8cba /crates/ra_hir_expand | |
parent | e16f3a5ee2f7df3f42827f3f279b5ed6774bde8e (diff) |
Rename range to by_kind
Diffstat (limited to 'crates/ra_hir_expand')
-rw-r--r-- | crates/ra_hir_expand/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_expand/src/lib.rs b/crates/ra_hir_expand/src/lib.rs index 720a29ea5..2fa5d5140 100644 --- a/crates/ra_hir_expand/src/lib.rs +++ b/crates/ra_hir_expand/src/lib.rs | |||
@@ -227,7 +227,7 @@ impl ExpansionInfo { | |||
227 | let token_id = self.macro_arg.1.token_by_range(range)?; | 227 | let token_id = self.macro_arg.1.token_by_range(range)?; |
228 | let token_id = self.macro_def.0.map_id_down(token_id); | 228 | let token_id = self.macro_def.0.map_id_down(token_id); |
229 | 229 | ||
230 | let range = self.exp_map.range_by_token(token_id)?.range(token.value.kind())?; | 230 | let range = self.exp_map.range_by_token(token_id)?.by_kind(token.value.kind())?; |
231 | 231 | ||
232 | let token = algo::find_covering_element(&self.expanded.value, range).into_token()?; | 232 | let token = algo::find_covering_element(&self.expanded.value, range).into_token()?; |
233 | 233 | ||
@@ -248,7 +248,7 @@ impl ExpansionInfo { | |||
248 | } | 248 | } |
249 | }; | 249 | }; |
250 | 250 | ||
251 | let range = token_map.range_by_token(token_id)?.range(token.value.kind())?; | 251 | let range = token_map.range_by_token(token_id)?.by_kind(token.value.kind())?; |
252 | let token = algo::find_covering_element(&tt.value, range + tt.value.text_range().start()) | 252 | let token = algo::find_covering_element(&tt.value, range + tt.value.text_range().start()) |
253 | .into_token()?; | 253 | .into_token()?; |
254 | Some((tt.with_value(token), origin)) | 254 | Some((tt.with_value(token), origin)) |