Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
745: Do not sum options r=phimuemue a=Philippe-Cholet A mistake on my part, discovered in time as code is still commented out. Note that it passed tests. It only returns None if the iterator yields None. But it would overflow whenever an addition does. Do not product options either, as multiplications could overflow the same way. That's how I found out. I guess `checked_sum` and `checked_product` methods would be nice. EDIT: ~Would you be interested?~ Related: rust-lang/rust#95485 Co-authored-by: Philippe-Cholet <phcholet@orange.fr>
- Loading branch information