diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 047771f..92c81f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: rust: - - 1.36.0 # MSRV + - 1.37.0 # MSRV - stable - beta - nightly @@ -38,7 +38,7 @@ jobs: toolchain: ${{ matrix.rust }} - name: MSRV dependencies - if: matrix.rust == '1.36.0' + if: matrix.rust == '1.37.0' run: | cargo generate-lockfile cargo update -p serde_json --precise 1.0.99 diff --git a/Cargo.toml b/Cargo.toml index 9320aec..ddef042 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "either" -version = "1.11.0" +version = "1.12.0" authors = ["bluss"] edition = "2018" -rust-version = "1.36" +rust-version = "1.37" license = "MIT OR Apache-2.0" repository = "https://github.com/rayon-rs/either" diff --git a/README.rst b/README.rst index 10ca2dd..659257f 100644 --- a/README.rst +++ b/README.rst @@ -25,12 +25,18 @@ __ https://docs.rs/either/ How to use with cargo:: [dependencies] - either = "1.11" + either = "1.12" Recent Changes -------------- +- 1.12.0 + + - **MSRV**: ``either`` now requires Rust 1.37 or later. + + - Specialize ``nth_back`` for ``Either`` and ``IterEither``, by @cuviper (#106) + - 1.11.0 - Add new trait ``IntoEither`` that is useful to convert to ``Either`` in method chains, diff --git a/src/iterator.rs b/src/iterator.rs index 791d5ec..9c5a83f 100644 --- a/src/iterator.rs +++ b/src/iterator.rs @@ -141,10 +141,9 @@ where for_both!(*self, ref mut inner => inner.next_back()) } - // TODO(MSRV): This was stabilized in Rust 1.37 - // fn nth_back(&mut self, n: usize) -> Option { - // for_both!(*self, ref mut inner => inner.nth_back(n)) - // } + fn nth_back(&mut self, n: usize) -> Option { + for_both!(*self, ref mut inner => inner.nth_back(n)) + } fn rfold(self, init: Acc, f: G) -> Acc where @@ -279,10 +278,9 @@ where Some(map_either!(self.inner, ref mut inner => inner.next_back()?)) } - // TODO(MSRV): This was stabilized in Rust 1.37 - // fn nth_back(&mut self, n: usize) -> Option { - // Some(map_either!(self.inner, ref mut inner => inner.nth_back(n)?)) - // } + fn nth_back(&mut self, n: usize) -> Option { + Some(map_either!(self.inner, ref mut inner => inner.nth_back(n)?)) + } fn rfold(self, init: Acc, f: G) -> Acc where