]> git.lizzy.rs Git - rust.git/commit
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)
commit07c7f35effe1a4602ba02baf9ff67a4eb214818f
tree1cf4253dc23366dfd20f36285036d73b168a526e
parent658e97a39e77bcb978697a66ddccd7e4b58990cf
parent8efe43245bc64ed27f88c333541b2cb7af2ce44c
Merge #6430

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>