Skip to content

Commit 03b701c

Browse files
committed
Release v0.2.0
1 parent 247d721 commit 03b701c

File tree

2 files changed

+34
-8
lines changed

2 files changed

+34
-8
lines changed

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Change Log
2+
3+
## [Unreleased]
4+
5+
## [v0.2.0] - 2019-03-10
6+
7+
### Changed
8+
9+
* All closures used by adaptor methods now return `Result`s.
10+
* `FromFallibleIterator::from_fallible_iterator` has been renamed to `from_fallible_iter` and now takes an
11+
`IntoFallibleIterator`.
12+
* `IntoFallibleIterator::into_fallible_iterator` has been renamed to `into_fallible_iter`.
13+
* `IntoFallibleIterator::IntoIter` has been renamed to `IntoFallibleIter`.
14+
15+
### Removed
16+
17+
* `FallibleIterator::and_then` has been removed as `FallibleIterator::map` is now equivalent.
18+
19+
### Added
20+
21+
* Added `step_by`, `for_each`, `skip_while`, `take_while`, `skip`, `scan`, `flat_map`, `flatten`, `inspect`,
22+
`partition`, `find_map`, `max_by`, `min_by`, `unzip`, `cycle`, and `try_fold` to `FallibleIterator`.
23+
* Added `rfold` and `try_rfold` to `DoubleEndedFallibleIterator`.
24+
25+
[Unreleased]: https://github.com/sfackler/rust-fallible-iterator/compare/v0.2.0...master
26+
[v0.2.0]: https://github.com/sfackler/rust-fallible-iterator/compare/v0.1.5...v0.2.0

src/lib.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
//! let big_numbers = numbers.filter(|n| Ok(u64::from_str(n)? > 100));
6464
//! assert!(big_numbers.count().is_err());
6565
//! ```
66-
#![doc(html_root_url = "https://docs.rs/fallible-iterator/0.1")]
66+
#![doc(html_root_url = "https://docs.rs/fallible-iterator/0.2")]
6767
#![warn(missing_docs)]
6868
#![cfg_attr(feature = "alloc", feature(alloc))]
6969
#![no_std]
@@ -444,7 +444,7 @@ pub trait FallibleIterator {
444444
T: FromFallibleIterator<Self::Item>,
445445
Self: Sized,
446446
{
447-
T::from_fallible_iterator(self)
447+
T::from_fallible_iter(self)
448448
}
449449

450450
/// Transforms the iterator into two collections, partitioning elements by a closure.
@@ -1055,15 +1055,15 @@ pub trait DoubleEndedFallibleIterator: FallibleIterator {
10551055
/// Conversion from a fallible iterator.
10561056
pub trait FromFallibleIterator<T>: Sized {
10571057
/// Creates a value from a fallible iterator.
1058-
fn from_fallible_iterator<I>(it: I) -> Result<Self, I::Error>
1058+
fn from_fallible_iter<I>(it: I) -> Result<Self, I::Error>
10591059
where
10601060
I: IntoFallibleIterator<Item = T>;
10611061
}
10621062

10631063
#[cfg(any(feature = "std", feature = "alloc"))]
10641064
impl<T> FromFallibleIterator<T> for Vec<T> {
10651065
#[inline]
1066-
fn from_fallible_iterator<I>(it: I) -> Result<Vec<T>, I::Error>
1066+
fn from_fallible_iter<I>(it: I) -> Result<Vec<T>, I::Error>
10671067
where
10681068
I: IntoFallibleIterator<Item = T>,
10691069
{
@@ -1081,7 +1081,7 @@ where
10811081
S: BuildHasher + Default,
10821082
{
10831083
#[inline]
1084-
fn from_fallible_iterator<I>(it: I) -> Result<HashSet<T, S>, I::Error>
1084+
fn from_fallible_iter<I>(it: I) -> Result<HashSet<T, S>, I::Error>
10851085
where
10861086
I: IntoFallibleIterator<Item = T>,
10871087
{
@@ -1103,7 +1103,7 @@ where
11031103
S: BuildHasher + Default,
11041104
{
11051105
#[inline]
1106-
fn from_fallible_iterator<I>(it: I) -> Result<HashMap<K, V, S>, I::Error>
1106+
fn from_fallible_iter<I>(it: I) -> Result<HashMap<K, V, S>, I::Error>
11071107
where
11081108
I: IntoFallibleIterator<Item = (K, V)>,
11091109
{
@@ -1124,7 +1124,7 @@ where
11241124
T: Ord,
11251125
{
11261126
#[inline]
1127-
fn from_fallible_iterator<I>(it: I) -> Result<BTreeSet<T>, I::Error>
1127+
fn from_fallible_iter<I>(it: I) -> Result<BTreeSet<T>, I::Error>
11281128
where
11291129
I: IntoFallibleIterator<Item = T>,
11301130
{
@@ -1144,7 +1144,7 @@ where
11441144
K: Ord,
11451145
{
11461146
#[inline]
1147-
fn from_fallible_iterator<I>(it: I) -> Result<BTreeMap<K, V>, I::Error>
1147+
fn from_fallible_iter<I>(it: I) -> Result<BTreeMap<K, V>, I::Error>
11481148
where
11491149
I: IntoFallibleIterator<Item = (K, V)>,
11501150
{

0 commit comments

Comments
 (0)