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 the blanket implementation for reference of Automaton #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/automaton.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ impl<'a, T: private::Sealed + ?Sized> private::Sealed for &'a T {}
/// // seen according to the automaton's match semantics. This returns an error
/// // if the given automaton does not support unanchored searches.
/// fn find<A: Automaton>(
/// aut: A,
/// aut: &A,
/// haystack: &[u8],
/// ) -> Result<Option<Match>, MatchError> {
/// let mut sid = aut.start_state(Anchored::No)?;
Expand Down Expand Up @@ -355,7 +355,7 @@ pub unsafe trait Automaton: private::Sealed {
&self,
input: &Input<'_>,
) -> Result<Option<Match>, MatchError> {
try_find_fwd(&self, input)
try_find_fwd(self, input)
}

/// Executes a overlapping search with this automaton using the given
Expand All @@ -369,7 +369,7 @@ pub unsafe trait Automaton: private::Sealed {
input: &Input<'_>,
state: &mut OverlappingState,
) -> Result<(), MatchError> {
try_find_overlapping_fwd(&self, input, state)
try_find_overlapping_fwd(self, input, state)
}

/// Returns an iterator of non-overlapping matches with this automaton
Expand Down Expand Up @@ -1557,7 +1557,7 @@ fn get_match<A: Automaton + ?Sized>(
/// overlapping is that of match and start states.)
pub(crate) fn fmt_state_indicator<A: Automaton>(
f: &mut core::fmt::Formatter<'_>,
aut: A,
aut: &A,
id: StateID,
) -> core::fmt::Result {
if aut.is_dead(id) {
Expand Down
Loading