Skip to content

Commit

Permalink
mention custom error type changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Geal committed Jan 16, 2018
1 parent 4209351 commit 11529f9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/upgrading_to_nom_4.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,11 @@ assert_eq!(parser(CompleteStr("abcd123")), Ok((CompleteStr("123"), CompleteStr("
These types allow you to correctly handle cases like text formats for which there might be a last
empty line or not, as seen in [one of the examples](https://github.com/Geal/nom/blob/87d837006467aebcdb0c37621da874a56c8562b5/tests/multiline.rs).

## Custom error types

Custom error types caused a lot of type inference issues in previous nom versions. Now error types
are automatically converted as needed. If you want to set up a custom error type, you now need to
implement `std::convert::From<u32>` for this type.
## Producers and consumers

Producers and consumers were removed in nom 4. That feature was too hard to integrate in code that
Expand Down

0 comments on commit 11529f9

Please sign in to comment.