Skip to content

Commit

Permalink
Fix iter and iter_mut doc tests for MSRV
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed Feb 10, 2024
1 parent c1ec796 commit c3178af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl<L, R> Either<L, R> {
/// use either::*;
///
/// let left: Either<_, &[u32]> = Left(vec![2, 3]);
/// let mut right: Either<Vec<u32>, _> = Right([4, 5].as_slice());
/// let mut right: Either<Vec<u32>, _> = Right(&[4, 5][..]);
/// let mut all = vec![1];
/// all.extend(left.iter());
/// all.extend(right.iter());
Expand All @@ -56,7 +56,7 @@ impl<L, R> Either<L, R> {
/// assert_eq!(left, Left(vec![4, 9]));
///
/// let mut inner = [4, 5];
/// let mut right: Either<Vec<u32>, _> = Right(inner.as_mut_slice());
/// let mut right: Either<Vec<u32>, _> = Right(&mut inner[..]);
/// for r in right.iter_mut() {
/// *r *= *r
/// }
Expand Down

0 comments on commit c3178af

Please sign in to comment.