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

Remove extraneous Input::Error trait bounds #353

Merged
merged 2 commits into from
Jun 7, 2023
Merged

Remove extraneous Input::Error trait bounds #353

merged 2 commits into from
Jun 7, 2023

Conversation

softmoth
Copy link
Contributor

@softmoth softmoth commented Sep 11, 2022

Due to an old Rust bug, rust-lang/rust#24159, many parsers included an extraneous trait bound for Input::Error as a workaround. That bug has been closed since February 2021, and the workaround is no longer needed.

There are a few places I did NOT remove Input::Error bound from the where clause, which would be nice to eliminate but I think may be required:

  • stream/position.rs requires it to specify the StreamError associated type in the Positioned and StreamOnce implementations.
  • stream/easy.rs similarly requires it to specify StreamError in the docs example
  • parser/combinator.rs requires Into<...::StreamError> for the error generic in its AndThen struct
  • src/lib.rs has similar awkward boilerplate for ...:StreamError: From<ParseIntError> in its docs examples

Due to an old Rust bug, rust-lang/rust#24159, many parsers included an
extraneous trait bound for Input::Error as a workaround. That bug has
been closed since February 2021, and the workaround is no longer needed.
Copy link
Owner

@Marwes Marwes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but tests are failing due to testing on an old rust. You can bump that to the version that has the fix and I can merge.

@Marwes Marwes merged commit 805862b into Marwes:master Jun 7, 2023
@softmoth softmoth deleted the rust-24159-is-fixed branch June 7, 2023 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants