Skip to content

Commit 275e012

Browse files
bors[bot]phimuemue
andauthored
Merge #451
451: Resolve warnings r=phimuemue a=phimuemue This fixes some warnings introduced in recent PRs. Co-authored-by: philipp <[email protected]>
2 parents 636a332 + 806e913 commit 275e012

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

examples/iris.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ fn main() {
5555
// using Itertools::fold_results to create the result of parsing
5656
let irises = DATA.lines()
5757
.map(str::parse)
58-
.fold_results(Vec::new(), |mut v, iris: Iris| {
58+
.fold_ok(Vec::new(), |mut v, iris: Iris| {
5959
v.push(iris);
6060
v
6161
});

src/adaptors/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,7 @@ where
10861086
I::Item: Into<R>,
10871087
{}
10881088

1089+
/// See [`MapOk`](struct.MapOk.html).
10891090
#[deprecated(note="Use MapOk instead", since="0.10")]
10901091
pub type MapResults<I, F> = MapOk<I, F>;
10911092

src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ pub mod structs {
8989
Batching,
9090
MapInto,
9191
MapOk,
92-
MapResults,
9392
Merge,
9493
MergeBy,
9594
TakeWhileRef,
@@ -100,7 +99,7 @@ pub mod structs {
10099
Update,
101100
};
102101
#[allow(deprecated)]
103-
pub use crate::adaptors::Step;
102+
pub use crate::adaptors::{MapResults, Step};
104103
#[cfg(feature = "use_std")]
105104
pub use crate::adaptors::MultiProduct;
106105
#[cfg(feature = "use_std")]
@@ -749,6 +748,7 @@ pub trait Itertools : Iterator {
749748
adaptors::map_into(self)
750749
}
751750

751+
/// See [`.map_ok()`](#method.map_ok).
752752
#[deprecated(note="Use .map_ok() instead", since="0.10")]
753753
fn map_results<F, T, U, E>(self, f: F) -> MapOk<Self, F>
754754
where Self: Iterator<Item = Result<T, E>> + Sized,
@@ -1840,8 +1840,9 @@ pub trait Itertools : Iterator {
18401840
format::new_format(self, sep, format)
18411841
}
18421842

1843+
/// See [`.fold_ok()`](#method.fold_ok).
18431844
#[deprecated(note="Use .fold_ok() instead", since="0.10")]
1844-
fn fold_results<A, E, B, F>(&mut self, mut start: B, mut f: F) -> Result<B, E>
1845+
fn fold_results<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
18451846
where Self: Iterator<Item = Result<A, E>>,
18461847
F: FnMut(B, A) -> B
18471848
{

0 commit comments

Comments
 (0)