This commit is contained in:
JT
2021-09-04 19:59:38 +12:00
parent 198a36b744
commit d9cff4238d
8 changed files with 31 additions and 40 deletions

View File

@ -236,9 +236,8 @@ impl Signature {
pub fn num_positionals_after(&self, idx: usize) -> usize {
let mut total = 0;
let mut curr = 0;
for positional in &self.required_positional {
for (curr, positional) in self.required_positional.iter().enumerate() {
match positional.shape {
SyntaxShape::Keyword(..) => {
// Keywords have a required argument, so account for that
@ -252,7 +251,6 @@ impl Signature {
}
}
}
curr += 1;
}
total
}