diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-06-07 13:17:28 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-06-07 13:17:28 +0100 |
commit | 8b6c3eaaeb6b074c7cbe34f25b7736157b13f84a (patch) | |
tree | 0fa5ba3bf62566d296441ccb414f294aa2cb343c /crates/ide_completion/src/render.rs | |
parent | 5f7fc5ae68ff5debead06e377153e100b6e9951d (diff) | |
parent | 4eabcb2c01209065a231e616ba646ba63f68f00d (diff) |
Merge #9164
9164: internal: Reduce the number of direct fields in `CompletionContext` some more r=Veykril a=Veykril
Doesn't make the code much simpler yet.
bors r+
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/ide_completion/src/render.rs')
-rw-r--r-- | crates/ide_completion/src/render.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/ide_completion/src/render.rs b/crates/ide_completion/src/render.rs index a49a60711..750694432 100644 --- a/crates/ide_completion/src/render.rs +++ b/crates/ide_completion/src/render.rs | |||
@@ -275,8 +275,12 @@ impl<'a> Render<'a> { | |||
275 | }; | 275 | }; |
276 | 276 | ||
277 | // Add `<>` for generic types | 277 | // Add `<>` for generic types |
278 | if self.ctx.completion.is_path_type | 278 | if self |
279 | && !self.ctx.completion.has_type_args | 279 | .ctx |
280 | .completion | ||
281 | .path_context | ||
282 | .as_ref() | ||
283 | .map_or(false, |it| it.is_path_type && !it.has_type_args) | ||
280 | && self.ctx.completion.config.add_call_parenthesis | 284 | && self.ctx.completion.config.add_call_parenthesis |
281 | { | 285 | { |
282 | if let Some(cap) = self.ctx.snippet_cap() { | 286 | if let Some(cap) = self.ctx.snippet_cap() { |