mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Provide only explicit constructor for RenderContext
This commit is contained in:
parent
2a214e15d3
commit
caf0fa20a7
2 changed files with 14 additions and 16 deletions
|
@ -36,7 +36,7 @@ pub(crate) struct RenderContext<'a> {
|
|||
}
|
||||
|
||||
impl<'a> RenderContext<'a> {
|
||||
fn new(completion: &'a CompletionContext<'a>) -> RenderContext<'a> {
|
||||
pub(crate) fn new(completion: &'a CompletionContext<'a>) -> RenderContext<'a> {
|
||||
RenderContext { completion }
|
||||
}
|
||||
|
||||
|
@ -74,12 +74,6 @@ impl<'a> RenderContext<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> From<&'a CompletionContext<'a>> for RenderContext<'a> {
|
||||
fn from(ctx: &'a CompletionContext<'a>) -> RenderContext<'a> {
|
||||
RenderContext::new(ctx)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Render<'a> {
|
||||
pub(crate) fn new(ctx: RenderContext<'a>) -> Render<'a> {
|
||||
Render { ctx }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue