Skip to content

Commit

Permalink
Fixed doc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zesterer committed Feb 3, 2025
1 parent 266f404 commit 4dc3098
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl fmt::Display for EmptyErr {
/// let parser = just::<_, _, extra::Err<Cheap>>("+");
/// let error = parser.parse("-").into_errors()[0];
///
/// assert_eq!(error.span(), &SimpleSpan::new(0,1));
/// assert_eq!(error.span(), &SimpleSpan::new((), 0..1));
/// ```
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
Expand Down Expand Up @@ -191,7 +191,7 @@ where
/// let parser = just::<_, _, extra::Err<Simple<char>>>("+");
/// let error = parser.parse("-").into_errors()[0];
///
/// assert_eq!(error.span(), &SimpleSpan::new(0,1));
/// assert_eq!(error.span(), &SimpleSpan::new((), 0..1));
/// assert_eq!(error.found(), Some(&'-'));
/// ```
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
Expand Down Expand Up @@ -587,7 +587,7 @@ where
/// let parser = one_of::<_, _, extra::Err<Rich<char>>>("1234");
/// let error = parser.parse("5").into_errors()[0].clone();
///
/// assert_eq!(error.span(), &SimpleSpan::new(0,1));
/// assert_eq!(error.span(), &SimpleSpan::new((), 0..1));
/// assert!(matches!(error.reason(), &RichReason::ExpectedFound {..}));
/// assert_eq!(error.found(), Some(&'5'));
///
Expand Down

0 comments on commit 4dc3098

Please sign in to comment.