Make the result of Const, FunctionRender and TypeAliasRender constructors optional

They use source() which now returns an Option so they need to too.
This commit is contained in:
Nick Spain 2021-01-01 17:26:39 +11:00
parent 3f1b3df65b
commit 7bfec89cf9
5 changed files with 17 additions and 20 deletions

View file

@ -157,8 +157,7 @@ impl<'a> Render<'a> {
let kind = match resolution {
ScopeDef::ModuleDef(Function(func)) => {
let item = render_fn(self.ctx, import_to_add, Some(local_name), *func);
return Some(item);
return render_fn(self.ctx, import_to_add, Some(local_name), *func);
}
ScopeDef::ModuleDef(Variant(_))
if self.ctx.completion.is_pat_binding_or_const