]> git.lizzy.rs Git - rust.git/commitdiff
Merge #6430
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>
Tue, 3 Nov 2020 07:54:45 +0000 (07:54 +0000)
committerGitHub <noreply@github.com>
Tue, 3 Nov 2020 07:54:45 +0000 (07:54 +0000)
6430: Move completions rendering into a separate module r=popzxc a=popzxc

This PR extracts rendering-related things from `Completions` structure to the new `render` module.

`render` module declares a `Render` structure (which is a generic renderer interface), `RenderContext` (interface for data/methods not required for completions generating, but required for rendering), and a bunch of smaller `*Render` structures which encapsulate logic behind rendering a certain item.

This is just a step in full separation direction, since the following this are still to be done:

- Move some data from `CompletionContext` to the `RenderContext`;
- Forbid any kind of rendering outside of `render` module;
- Extract score computing into a separate module.

This PR is already pretty big, so not to make it even harder to review I decided to split this process into several subsequent PRs.

Co-authored-by: Igor Aleksanov <popzxc@yandex.ru>

Trivial merge