Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement
PeekingNext
transitively over mutable references.
This change applies patterns used for the standard `Iterator` trait to the `PeekingNext` trait. Generic methods require `Self: Sized` and `PeekingNext` is now transitively implemented over mutable references. This allows generic code to easily accept owned and mutably borrowed types that implement `PeekingNext`. This also makes `PeekingNext` object-safe (though this has little utility today).
- Loading branch information