Skip to content

Commit

Permalink
Fixed doc links
Browse files Browse the repository at this point in the history
  • Loading branch information
zesterer committed Oct 21, 2024
1 parent d611f42 commit 6aa77b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ impl<'a, 'parse, I: Input<'a>, C> Marker<'a, 'parse, I, C> {
}
}

/// Get the [`SaveMarker`][Recorder::SaveMarker] that this marker corresponds to.
/// Get the [`SaveMarker`][Inspector::SaveMarker] that this marker corresponds to.
pub fn ext_checkpoint(self) -> C {
self.user_checkpoint
}
Expand Down
6 changes: 3 additions & 3 deletions src/inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use crate::Parser;
///
/// If you don't need to receive event hooks, use [`SimpleState`].
pub trait Inspector<'a, I: Input<'a>> {
/// A type the Recorder can use to revert to a previous state.
/// A type the Inspector can use to revert to a previous state.
///
/// For implementation reasons, this is required to be `Copy + Clone`.
type SaveMarker: Copy + Clone;
Expand All @@ -26,7 +26,7 @@ pub trait Inspector<'a, I: Input<'a>> {
fn on_save(&self, offset: I::Offset) -> Self::SaveMarker;
/// This function is called when a combinator rewinds to an earlier state of the parser.
///
/// You can use [`Marker::ext_marker`] to get back the [`SaveMarker`][Self::SaveMarker]
/// You can use [`Marker::ext_checkpoint`] to get back the [`SaveMarker`][Self::SaveMarker]
/// you originally created in [`on_save`][Self::on_save].
fn on_rewind<'parse>(&mut self, marker: Marker<'a, 'parse, I, Self::SaveMarker>);
}
Expand All @@ -40,7 +40,7 @@ impl<'a, I: Input<'a>> Inspector<'a, I> for () {

/// A state type that should be accessible directly from `parser.state()` and has no special behavior.
///
/// This wrapper implements the [`Recorder`] trait for you so you don't have to.
/// This wrapper implements the [`Inspector`] trait for you so you don't have to.
pub struct SimpleState<T>(pub T);
impl<'a, T, I: Input<'a>> Inspector<'a, I> for SimpleState<T> {
type SaveMarker = ();
Expand Down

0 comments on commit 6aa77b8

Please sign in to comment.