Ronno Das

Results 18 comments of Ronno Das

I think it would make sense to not suggest `missing-dict-items` if the keys of the dictionary have type `tuple[A, B]`, ie tuples of length 2.

`map_or_else` with `|foo| foo` is just `unwrap_or_else`: ```rust // suggested in the docs: let _ = optional.map_or_else(||{ let y = do_complicated_function(); y*y }, |foo| foo); ``` should just be ```rust...

> Running totals and `0, |x,y| x+y` surely makes me think of python's `itertools.accumulate` which was a bit discussed in #705 and #147. Which is there seen with `scan`: `(0..4).scan(0,...

It may be easier to add `array_permutations()` if you want to avoid macro hackery.

It seems possible to share most of the code from `permutations()`, similar to the `array_combinations()` implementation. In that case we probably want to start with: ```rust impl PoolIndex for Box...

Re the MSRV failure, I'm not sure what the idiomatic way is to trigger a PME on 1.63 based on `N > 0`.

@bend-n Do you mean [`slice::as_chunks`](https://doc.rust-lang.org/std/primitive.slice.html#method.as_chunks)? That works for slices, but this is for a general iterator. There's also a nightly version of this in std: [Iterator::array_chunks](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.array_chunks). If you're asking about...

The `Vec` methods were added in rust-lang/rust#36743 but there doesn't seem to be an explanation for the choice of `&mut`. It does make the method slightly more general without affecting...

I'm not sure there's an iterator based solution that'll be better than what you've written for merging two maps (some reasons below) but here's a functional equivalent: ```rust fn merge_sum(...

Here is what @phimuemue suggests: ```rust fn merge_sum_ordered( map1: BTreeMap, map2: BTreeMap, ) -> BTreeMap { use itertools::EitherOrBoth::{Both, Left, Right}; map1.into_iter() .merge_join_by(map2, |(k1, _), (k2, _)| k1.cmp(k2)) .map(|ts| match ts...