]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Auto merge of #86765 - cuviper:fuse-less-specialized, r=joshtriplett
authorbors <bors@rust-lang.org>
Wed, 14 Jul 2021 21:17:52 +0000 (21:17 +0000)
committerbors <bors@rust-lang.org>
Wed, 14 Jul 2021 21:17:52 +0000 (21:17 +0000)
commit2f391da2e6ac73faa3570b79de239fd8c0edf1a9
tree9609167c43be91396b85d68985b24a82e12b65cd
parente87188c252a3b6dea8ed54d7915fbc2cfb61443b
parent6f5e933adb5705e15380b17ee9a2d7afb19748f2
Auto merge of #86765 - cuviper:fuse-less-specialized, r=joshtriplett

Make the specialized Fuse still deal with None

Fixes #85863 by removing the assumption that we'll never see a cleared iterator in the `I: FusedIterator` specialization. Now all `Fuse` methods check for the possibility that `self.iter` is `None`, and the specialization only avoids _setting_ that to `None` in `&mut self` methods.