Provide only explicit constructor for RenderContext
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user