Skip to content

Commit a96ef76

Browse files
authored
Merge pull request #612 from cuishuang/master
2 parents 943494c + f520157 commit a96ef76

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

benches/extra/zipslices.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::cmp;
33
// Note: There are different ways to implement ZipSlices.
44
// This version performed the best in benchmarks.
55
//
6-
// I also implemented a version with three pointes (tptr, tend, uptr),
6+
// I also implemented a version with three pointers (tptr, tend, uptr),
77
// that mimiced slice::Iter and only checked bounds by using tptr == tend,
88
// but that was inferior to this solution.
99

src/flatten_ok.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ where
4646
return Some(Ok(item));
4747
} else {
4848
// This is necessary for the iterator to implement `FusedIterator`
49-
// with only the orginal iterator being fused.
49+
// with only the original iterator being fused.
5050
self.inner_front = None;
5151
}
5252
}
@@ -61,7 +61,7 @@ where
6161
return Some(Ok(item));
6262
} else {
6363
// This is necessary for the iterator to implement `FusedIterator`
64-
// with only the orginal iterator being fused.
64+
// with only the original iterator being fused.
6565
self.inner_back = None;
6666
}
6767
} else {
@@ -105,7 +105,7 @@ where
105105
return Some(Ok(item));
106106
} else {
107107
// This is necessary for the iterator to implement `FusedIterator`
108-
// with only the orginal iterator being fused.
108+
// with only the original iterator being fused.
109109
self.inner_back = None;
110110
}
111111
}
@@ -120,7 +120,7 @@ where
120120
return Some(Ok(item));
121121
} else {
122122
// This is necessary for the iterator to implement `FusedIterator`
123-
// with only the orginal iterator being fused.
123+
// with only the original iterator being fused.
124124
self.inner_front = None;
125125
}
126126
} else {

src/free.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ pub fn min<I>(iterable: I) -> Option<I::Item>
239239
}
240240

241241

242-
/// Combine all iterator elements into one String, seperated by `sep`.
242+
/// Combine all iterator elements into one String, separated by `sep`.
243243
///
244244
/// [`IntoIterator`] enabled version of [`Itertools::join`].
245245
///

src/kmerge_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ fn sift_down<T, S>(heap: &mut [T], index: usize, mut less_than: S)
8080
// that wouldn't be predicted if present
8181
while child + 1 < heap.len() {
8282
// pick the smaller of the two children
83-
// use aritmethic to avoid an unpredictable branch
83+
// use arithmetic to avoid an unpredictable branch
8484
child += less_than(&heap[child+1], &heap[child]) as usize;
8585

8686
// sift down is done if we are already in order

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ macro_rules! izip {
387387
/// let with_macro: Chain<Chain<Once<_>, Take<Repeat<_>>>, slice::Iter<_>> =
388388
/// chain![once(&0), repeat(&1).take(2), &[2, 3, 5],];
389389
///
390-
/// // ...is equivalant to this:
390+
/// // ...is equivalent to this:
391391
/// let with_method: Chain<Chain<Once<_>, Take<Repeat<_>>>, slice::Iter<_>> =
392392
/// once(&0)
393393
/// .chain(repeat(&1).take(2))
@@ -904,7 +904,7 @@ pub trait Itertools : Iterator {
904904
/// a series of `Result::Ok` values. `Result::Err` values are unchanged.
905905
///
906906
/// This is useful when you have some common error type for your crate and
907-
/// need to propogate it upwards, but the `Result::Ok` case needs to be flattened.
907+
/// need to propagate it upwards, but the `Result::Ok` case needs to be flattened.
908908
///
909909
/// ```
910910
/// use itertools::Itertools;
@@ -913,7 +913,7 @@ pub trait Itertools : Iterator {
913913
/// let it = input.iter().cloned().flatten_ok();
914914
/// itertools::assert_equal(it.clone(), vec![Ok(0), Ok(1), Err(false), Ok(2), Ok(3)]);
915915
///
916-
/// // This can also be used to propogate errors when collecting.
916+
/// // This can also be used to propagate errors when collecting.
917917
/// let output_result: Result<Vec<i32>, bool> = it.collect();
918918
/// assert_eq!(output_result, Err(false));
919919
/// ```
@@ -3157,7 +3157,7 @@ pub trait Itertools : Iterator {
31573157
/// be equal to `ypos`.
31583158
///
31593159
/// On an iterator of length `n`, `position_minmax` does `1.5 * n`
3160-
/// comparisons, and so is faster than calling `positon_min` and
3160+
/// comparisons, and so is faster than calling `position_min` and
31613161
/// `position_max` separately which does `2 * n` comparisons.
31623162
///
31633163
/// For the minimum, if several elements are equally minimum, the

0 commit comments

Comments
 (0)