args -> params

This commit is contained in:
Florian Diebold 2019-01-12 21:58:16 +01:00
parent 5db5f5cc1d
commit 1ed7fbfc1b
8 changed files with 37 additions and 37 deletions

View file

@ -63,7 +63,7 @@ fn complete_methods(
) -> Cancelable<()> {
receiver.iterate_methods(ctx.db, |func| {
let sig = func.signature(ctx.db);
if sig.has_self_arg() {
if sig.has_self_param() {
CompletionItem::new(CompletionKind::Reference, sig.name().to_string())
.from_function(ctx, func)
.kind(CompletionItemKind::Method)

View file

@ -191,7 +191,7 @@ impl Builder {
) -> Builder {
// If not an import, add parenthesis automatically.
if ctx.use_item_syntax.is_none() && !ctx.is_call {
if function.signature(ctx.db).args().is_empty() {
if function.signature(ctx.db).params().is_empty() {
self.snippet = Some(format!("{}()$0", self.label));
} else {
self.snippet = Some(format!("{}($0)", self.label));