Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rayon-rs/either
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.9.0
Choose a base ref
...
head repository: rayon-rs/either
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.10.0
Choose a head ref

Commits on Jan 19, 2024

  1. Copy the full SHA
    396a846 View commit details
  2. Merge pull request #94 from cuviper/ci-merge

    CI: Add a "Complete" job for branch protection
    cuviper authored Jan 19, 2024
    Copy the full SHA
    c395b14 View commit details
  3. Copy the full SHA
    c391ac5 View commit details
  4. Merge pull request #95 from cuviper/org-links

    Update all links to the rayon-rs org
    cuviper authored Jan 19, 2024
    Copy the full SHA
    18be20a View commit details

Commits on Jan 20, 2024

  1. Copy the full SHA
    c12522f View commit details
  2. Copy the full SHA
    35a1e74 View commit details
  3. Copy the full SHA
    1cb6cf5 View commit details
  4. Merge pull request #96 from cuviper/doc-links

    Minor fixes
    cuviper authored Jan 20, 2024
    Copy the full SHA
    af9f5fb View commit details

Commits on Feb 10, 2024

  1. ci: rewrite the success job

    This is copied from how rust-lang/miri-test-libstd does it.
    cuviper committed Feb 10, 2024
    Copy the full SHA
    0852ad3 View commit details
  2. ci: handle master -> main

    cuviper committed Feb 10, 2024
    Copy the full SHA
    bd4269b View commit details
  3. Copy the full SHA
    6659d0c View commit details
  4. Merge pull request #97 from cuviper/ci

    ci: rewrite the success job
    cuviper authored Feb 10, 2024
    Copy the full SHA
    361af9e View commit details
  5. add factor_iter method to convert Either<Iter<L>, Iter<R>> into Iter<…

    …Eiter<L,R>>
    
    Added as a method as Iter is already implemented if both sides are
    iterators of the same type of item.
    aj-bagwell authored and cuviper committed Feb 10, 2024
    Copy the full SHA
    f21b17d View commit details
  6. Copy the full SHA
    43f61a5 View commit details
  7. Copy the full SHA
    a155f76 View commit details
  8. Refine factor_iter return type

    Based on cuviper's review add a bit more detail to the factor_iter
    return type so that it will implement more specific iterators (e.g.
    DoubleEndedIterator) if both sides do.
    aj-bagwell authored and cuviper committed Feb 10, 2024
    Copy the full SHA
    7539713 View commit details
  9. clean up iter() lifetimes

    Co-authored-by: Josh Stone <cuviper@gmail.com>
    aj-bagwell and cuviper committed Feb 10, 2024
    Copy the full SHA
    55b6237 View commit details
  10. clean up iter_mut() lifetimes

    Co-authored-by: Josh Stone <cuviper@gmail.com>
    aj-bagwell and cuviper committed Feb 10, 2024
    Copy the full SHA
    009bf8f View commit details
  11. fix It-o-erator typo

    Co-authored-by: Jack Wrenn <me@jswrenn.com>
    2 people authored and cuviper committed Feb 10, 2024
    Copy the full SHA
    a6e0026 View commit details
  12. Copy the full SHA
    356d9b6 View commit details
  13. Copy the full SHA
    c1ec796 View commit details
  14. Copy the full SHA
    c3178af View commit details
  15. Copy the full SHA
    2a37eba View commit details
  16. Copy the full SHA
    499b9ed View commit details
  17. Merge pull request #91 from aj-bagwell/master

    add factor_iter() and iter() methods
    cuviper authored Feb 10, 2024
    Copy the full SHA
    254fbf6 View commit details
  18. Release 1.10.0

    cuviper committed Feb 10, 2024
    Copy the full SHA
    071f034 View commit details
  19. Copy the full SHA
    5fcb289 View commit details
  20. Merge pull request #98 from cuviper/release-1.10.0

    Release 1.10.0
    cuviper authored Feb 10, 2024
    Copy the full SHA
    ede3c47 View commit details
Showing with 511 additions and 180 deletions.
  1. +26 −4 .github/workflows/ci.yml
  2. +2 −2 Cargo.toml
  3. +9 −3 README.rst
  4. +317 −0 src/iterator.rs
  5. +157 −171 src/lib.rs
30 changes: 26 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
merge_group:

name: CI

@@ -23,7 +23,14 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache the registry
uses: actions/cache@v4
if: startsWith(matrix.rust, '1')
with:
path: ~/.cargo/registry/index
key: cargo-${{ matrix.rust }}-git-index

- name: Set up Rust
uses: dtolnay/rust-toolchain@master
@@ -56,7 +63,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up nightly Rust
uses: dtolnay/rust-toolchain@nightly
@@ -68,3 +75,18 @@ jobs:

- name: Clippy
run: cargo clippy # -- -D warnings

# One job that "summarizes" the success state of this pipeline. This can then be added to branch
# protection, rather than having to add each job separately.
success:
name: Success
runs-on: ubuntu-latest
needs: [ci, clippy]
# Github branch protection is exceedingly silly and treats "jobs skipped because a dependency
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
# dependencies fails.
if: always() # make sure this is never "skipped"
steps:
# Manually check the status of all dependencies. `if: failure()` does not work.
- name: check if any dependency failed
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "either"
version = "1.9.0"
version = "1.10.0"
authors = ["bluss"]
edition = "2018"
rust-version = "1.36"

license = "MIT OR Apache-2.0"
repository = "https://github.com/bluss/either"
repository = "https://github.com/rayon-rs/either"
documentation = "https://docs.rs/either/1/"
readme = "README-crates.io.md"

12 changes: 9 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -16,21 +16,27 @@ __ https://docs.rs/either/

|build_status|_ |crates|_

.. |build_status| image:: https://github.com/bluss/either/workflows/CI/badge.svg?branch=master
.. _build_status: https://github.com/bluss/either/actions
.. |build_status| image:: https://github.com/rayon-rs/either/workflows/CI/badge.svg?branch=main
.. _build_status: https://github.com/rayon-rs/either/actions

.. |crates| image:: https://img.shields.io/crates/v/either.svg
.. _crates: https://crates.io/crates/either

How to use with cargo::

[dependencies]
either = "1.8"
either = "1.10"


Recent Changes
--------------

- 1.10.0

- Add new methods ``.factor_iter()``, ``.factor_iter_mut()``, and ``.factor_into_iter()``
that return ``Either`` items, plus ``.iter()`` and ``.iter_mut()`` to convert to direct
referene iterators; by @aj-bagwell and @cuviper (#91)

- 1.9.0

- Add new methods ``.map_either()`` and ``.map_either_with()``, by @nasadorian (#82)
Loading