Files
rust/src/libcore
Dylan DPC 530c320e75 Rollup merge of #70366 - cuviper:option-fuse, r=dtolnay
Implement Fuse with Option

The former `done` flag was roughly similar to an `Option` tag, but left
the possibity of misuse. By using a real `Option`, we can set `None`
when the iterator is exhausted, removing any way to call it again. We
also allow niche layout this way, so the `Fuse` may be smaller.

The `FusedIterator` specialization does want to ignore the possibility
of exhaustion though, so it uses `unsafe { intrinsics::unreachable() }`
to optimize that branch away. The entire `Fuse` implementation is now
isolated in its own module to contain that unsafety.

r? @scottmcm
2020-03-25 19:28:12 +01:00
..
2019-12-22 17:42:47 -05:00
2019-12-22 17:42:47 -05:00
2020-02-11 10:22:47 +01:00
2020-03-17 22:19:11 +01:00
2020-03-14 14:05:26 +01:00
2019-11-26 23:02:11 -08:00
2019-12-22 17:42:47 -05:00
2019-11-26 23:02:11 -08:00
2019-12-22 17:42:47 -05:00
2020-03-10 10:31:03 +01:00
2020-03-06 15:19:31 +01:00
2020-02-23 23:59:39 -08:00
2019-11-26 23:02:11 -08:00
2019-11-26 23:02:11 -08:00