From c5c5f4260b4ab1a03d2d3f7a616202369adc9ade Mon Sep 17 00:00:00 2001 From: kjeremy Date: Mon, 13 Jan 2020 11:38:53 -0500 Subject: Readability --- crates/ra_ide/src/call_info.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/ra_ide/src') diff --git a/crates/ra_ide/src/call_info.rs b/crates/ra_ide/src/call_info.rs index 14f5ead6b..72a68522e 100644 --- a/crates/ra_ide/src/call_info.rs +++ b/crates/ra_ide/src/call_info.rs @@ -4,7 +4,7 @@ use ra_syntax::{ ast::{self, ArgListOwner}, match_ast, AstNode, SyntaxNode, }; -use std::cmp::Ordering; + use test_utils::tested_by; use crate::{ @@ -51,14 +51,14 @@ pub(crate) fn call_info(db: &RootDatabase, position: FilePosition) -> Option {} - Ordering::Equal => { + match num_params { + 0 => (), + 1 => { if !has_self { call_info.active_parameter = Some(0); } } - Ordering::Greater => { + _ => { if let Some(arg_list) = calling_node.arg_list() { // Number of arguments specified at the call site let num_args_at_callsite = arg_list.args().count(); -- cgit v1.2.3