Commit ad21558
authored
Rollup merge of rust-lang#62481 - czipperz:iterator-last-nth-use-for_each, r=scottmcm
Use `fold` in `Iterator::last` default implementation
We already use it in all the other methods. Consistency + potential perf is a pretty nice win!1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
267 | | - | |
268 | | - | |
| 266 | + | |
269 | 267 | | |
270 | 268 | | |
271 | 269 | | |
| |||
0 commit comments