Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benches/extra/zipslices.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::cmp;
// Note: There are different ways to implement ZipSlices.
// This version performed the best in benchmarks.
//
// I also implemented a version with three pointes (tptr, tend, uptr),
// I also implemented a version with three pointers (tptr, tend, uptr),
// that mimiced slice::Iter and only checked bounds by using tptr == tend,
// but that was inferior to this solution.

Expand Down
8 changes: 4 additions & 4 deletions src/flatten_ok.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ where
return Some(Ok(item));
} else {
// This is necessary for the iterator to implement `FusedIterator`
// with only the orginal iterator being fused.
// with only the original iterator being fused.
self.inner_front = None;
}
}
Expand All @@ -61,7 +61,7 @@ where
return Some(Ok(item));
} else {
// This is necessary for the iterator to implement `FusedIterator`
// with only the orginal iterator being fused.
// with only the original iterator being fused.
self.inner_back = None;
}
} else {
Expand Down Expand Up @@ -105,7 +105,7 @@ where
return Some(Ok(item));
} else {
// This is necessary for the iterator to implement `FusedIterator`
// with only the orginal iterator being fused.
// with only the original iterator being fused.
self.inner_back = None;
}
}
Expand All @@ -120,7 +120,7 @@ where
return Some(Ok(item));
} else {
// This is necessary for the iterator to implement `FusedIterator`
// with only the orginal iterator being fused.
// with only the original iterator being fused.
self.inner_front = None;
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/free.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ pub fn min<I>(iterable: I) -> Option<I::Item>
}


/// Combine all iterator elements into one String, seperated by `sep`.
/// Combine all iterator elements into one String, separated by `sep`.
///
/// [`IntoIterator`] enabled version of [`Itertools::join`].
///
Expand Down
2 changes: 1 addition & 1 deletion src/kmerge_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ fn sift_down<T, S>(heap: &mut [T], index: usize, mut less_than: S)
// that wouldn't be predicted if present
while child + 1 < heap.len() {
// pick the smaller of the two children
// use aritmethic to avoid an unpredictable branch
// use arithmetic to avoid an unpredictable branch
child += less_than(&heap[child+1], &heap[child]) as usize;

// sift down is done if we are already in order
Expand Down
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ macro_rules! izip {
/// let with_macro: Chain<Chain<Once<_>, Take<Repeat<_>>>, slice::Iter<_>> =
/// chain![once(&0), repeat(&1).take(2), &[2, 3, 5],];
///
/// // ...is equivalant to this:
/// // ...is equivalent to this:
/// let with_method: Chain<Chain<Once<_>, Take<Repeat<_>>>, slice::Iter<_>> =
/// once(&0)
/// .chain(repeat(&1).take(2))
Expand Down Expand Up @@ -904,7 +904,7 @@ pub trait Itertools : Iterator {
/// a series of `Result::Ok` values. `Result::Err` values are unchanged.
///
/// This is useful when you have some common error type for your crate and
/// need to propogate it upwards, but the `Result::Ok` case needs to be flattened.
/// need to propagate it upwards, but the `Result::Ok` case needs to be flattened.
///
/// ```
/// use itertools::Itertools;
Expand All @@ -913,7 +913,7 @@ pub trait Itertools : Iterator {
/// let it = input.iter().cloned().flatten_ok();
/// itertools::assert_equal(it.clone(), vec![Ok(0), Ok(1), Err(false), Ok(2), Ok(3)]);
///
/// // This can also be used to propogate errors when collecting.
/// // This can also be used to propagate errors when collecting.
/// let output_result: Result<Vec<i32>, bool> = it.collect();
/// assert_eq!(output_result, Err(false));
/// ```
Expand Down Expand Up @@ -3157,7 +3157,7 @@ pub trait Itertools : Iterator {
/// be equal to `ypos`.
///
/// On an iterator of length `n`, `position_minmax` does `1.5 * n`
/// comparisons, and so is faster than calling `positon_min` and
/// comparisons, and so is faster than calling `position_min` and
/// `position_max` separately which does `2 * n` comparisons.
///
/// For the minimum, if several elements are equally minimum, the
Expand Down