@@ -190,6 +190,12 @@ impl<I> Iterator for Fuse<I> where I: FusedIterator {
190
190
3 . Fuse isn't used very often anyways. However, I would argue that it should be
191
191
used more often and people are just playing fast and loose. I'm hoping that
192
192
making ` Fuse ` free when unneeded will encourage people to use it when they should.
193
+ 4 . This trait locks implementors into following the ` FusedIterator ` spec;
194
+ removing the ` FusedIterator ` implementation would be a breaking change. This
195
+ precludes future optimizations that take advantage of the fact that the
196
+ behavior of an ` Iterator ` is undefined after it returns ` None ` the first
197
+ time.
198
+
193
199
194
200
# Alternatives
195
201
@@ -268,9 +274,11 @@ change.
268
274
[ unresolved ] : #unresolved-questions
269
275
270
276
Should this trait be unsafe? I can't think of any way generic unsafe code could
271
- end up relying on the guarantees of ` Fused ` .
277
+ end up relying on the guarantees of ` FusedIterator ` .
272
278
273
- Also, it's possible to implement the specialized ` Fuse ` struct without a useless
274
- ` don ` bool. Unfortunately, it's * very* messy. IMO, this is not worth it for now
279
+ ~~ Also, it's possible to implement the specialized ` Fuse ` struct without a useless
280
+ ` done ` bool. Unfortunately, it's * very* messy. IMO, this is not worth it for now
275
281
and can always be fixed in the future as it doesn't change the ` FusedIterator `
276
- trait.
282
+ trait.~~ Resolved: It's not possible to remove the ` done ` bool without making
283
+ ` Fuse ` invariant.
284
+
0 commit comments