@tamme indeed, but I do want the index in this case (it's part of the return value), so I need enumerate() and max_by_key() and at that point it becomes messier to my eyes 🤷♂️ EDIT: although I guess I can use enumerate and the same max, and that's what you meant with mixing for an iterators 🤔
@riffraff I think clippy just wants you to avoid you using indexing. You can mix for loops with iterators. So for example use `for value in numbers.iter().take(wanted) {` instead of the range. Which also makes the calculation of `end` easier to understand.
@tamme indeed, but I do want the index in this case (it's part of the return value), so I need enumerate() and max_by_key() and at that point it becomes messier to my eyes 🤷♂️EDIT: although I guess I can use enumerate and the same max, and that's what you meant with mixing for an iterators 🤔