Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename Error::iter_chain() and remove Error::iter_sources() #65557

Merged
merged 1 commit into from
Nov 15, 2019

Commits on Oct 22, 2019

  1. rename Error::iter_chain() and remove Error::iter_sources()

    Rename
    * Error::iter_chain() -> Error::chain()
    * ErrorIter -> Chain
    
    Removed
    * Error::iter_sources()
    
    according to
    rust-lang#58520
    
    Rationale:
    
       1. Such iterators are helpful. They should better be stabilized sooner
          than later.
       2. self should be included. It is easy to .skip(1) it.
          Not including self is harmful because it is harder to add self
          to the iterator than to remove it.
       3. The chosen name should be telling and reflect the fact that self is
          included. `.chain()` was chosen because the iterator iterates over
          the chain of errors that is somehow included in self.
       4. The resulting iterator is named `Chain` because the `error::Chain`
          is what we want to have.
    haraldh committed Oct 22, 2019
    Configuration menu
    Copy the full SHA
    7b9d50d View commit details
    Browse the repository at this point in the history