Why `Splice` doesn't implement `FusedIterator`?
⚓ Rust 📅 2025-10-23 👤 surdeus 👁️ 2I am not good at English. Sorry if there are any funny expressions.
std::vec::Splice does not implement FusedIterator. But Why?
This iterator generates the values to be deleted from the vector.
I wonder that the deletion targets of mutable-referenced collections don't appear later?
Now, I'm creating a custom type similar to Splice.
So, I need criteria for determining whether to mark it with FusedIterator.
I tried thinking about it myself as follows, but I hit a wall.
Vec<T>::splice method that returns a Splice is pretty complex...
The behavior of deletion and registration when dropping Splice is bit tricky.
Could that be the reason? Hmm..., I just don't get it.
3 posts - 2 participants
🏷️ Rust_feed