Skip to content

Commit

Permalink
Release v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Mar 10, 2019
1 parent 247d721 commit 03b701c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 8 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Change Log

## [Unreleased]

## [v0.2.0] - 2019-03-10

### Changed

* All closures used by adaptor methods now return `Result`s.
* `FromFallibleIterator::from_fallible_iterator` has been renamed to `from_fallible_iter` and now takes an
`IntoFallibleIterator`.
* `IntoFallibleIterator::into_fallible_iterator` has been renamed to `into_fallible_iter`.
* `IntoFallibleIterator::IntoIter` has been renamed to `IntoFallibleIter`.

### Removed

* `FallibleIterator::and_then` has been removed as `FallibleIterator::map` is now equivalent.

### Added

* Added `step_by`, `for_each`, `skip_while`, `take_while`, `skip`, `scan`, `flat_map`, `flatten`, `inspect`,
`partition`, `find_map`, `max_by`, `min_by`, `unzip`, `cycle`, and `try_fold` to `FallibleIterator`.
* Added `rfold` and `try_rfold` to `DoubleEndedFallibleIterator`.

[Unreleased]: https://github.com/sfackler/rust-fallible-iterator/compare/v0.2.0...master
[v0.2.0]: https://github.com/sfackler/rust-fallible-iterator/compare/v0.1.5...v0.2.0
16 changes: 8 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
//! let big_numbers = numbers.filter(|n| Ok(u64::from_str(n)? > 100));
//! assert!(big_numbers.count().is_err());
//! ```
#![doc(html_root_url = "https://docs.rs/fallible-iterator/0.1")]
#![doc(html_root_url = "https://docs.rs/fallible-iterator/0.2")]
#![warn(missing_docs)]
#![cfg_attr(feature = "alloc", feature(alloc))]
#![no_std]
Expand Down Expand Up @@ -444,7 +444,7 @@ pub trait FallibleIterator {
T: FromFallibleIterator<Self::Item>,
Self: Sized,
{
T::from_fallible_iterator(self)
T::from_fallible_iter(self)
}

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

#[cfg(any(feature = "std", feature = "alloc"))]
impl<T> FromFallibleIterator<T> for Vec<T> {
#[inline]
fn from_fallible_iterator<I>(it: I) -> Result<Vec<T>, I::Error>
fn from_fallible_iter<I>(it: I) -> Result<Vec<T>, I::Error>
where
I: IntoFallibleIterator<Item = T>,
{
Expand All @@ -1081,7 +1081,7 @@ where
S: BuildHasher + Default,
{
#[inline]
fn from_fallible_iterator<I>(it: I) -> Result<HashSet<T, S>, I::Error>
fn from_fallible_iter<I>(it: I) -> Result<HashSet<T, S>, I::Error>
where
I: IntoFallibleIterator<Item = T>,
{
Expand All @@ -1103,7 +1103,7 @@ where
S: BuildHasher + Default,
{
#[inline]
fn from_fallible_iterator<I>(it: I) -> Result<HashMap<K, V, S>, I::Error>
fn from_fallible_iter<I>(it: I) -> Result<HashMap<K, V, S>, I::Error>
where
I: IntoFallibleIterator<Item = (K, V)>,
{
Expand All @@ -1124,7 +1124,7 @@ where
T: Ord,
{
#[inline]
fn from_fallible_iterator<I>(it: I) -> Result<BTreeSet<T>, I::Error>
fn from_fallible_iter<I>(it: I) -> Result<BTreeSet<T>, I::Error>
where
I: IntoFallibleIterator<Item = T>,
{
Expand All @@ -1144,7 +1144,7 @@ where
K: Ord,
{
#[inline]
fn from_fallible_iterator<I>(it: I) -> Result<BTreeMap<K, V>, I::Error>
fn from_fallible_iter<I>(it: I) -> Result<BTreeMap<K, V>, I::Error>
where
I: IntoFallibleIterator<Item = (K, V)>,
{
Expand Down

0 comments on commit 03b701c

Please sign in to comment.