From: Matt S Trout Date: Sat, 14 Apr 2018 21:43:26 +0000 (+0000) Subject: eliminate vestigial force_backtrack methods X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FDX.git;a=commitdiff_plain;h=0630503012d83a86a3d01e96f4d1be0d8791fc4b eliminate vestigial force_backtrack methods --- diff --git a/lib/DX/SearchProcess.pm b/lib/DX/SearchProcess.pm index 3072313..2838584 100644 --- a/lib/DX/SearchProcess.pm +++ b/lib/DX/SearchProcess.pm @@ -34,15 +34,6 @@ sub find_solution { return $self->but(current_search_state => $state); } -sub force_backtrack { - my ($self) = @_; - my $new_ss = $self->current_search_state->force_backtrack; - # XXX infinite loop without the next line and I'm unsure why we don't - # get a loop-ending undef from elsewhere if the backtrack failed - return undef unless $new_ss->next_step; - return $self->but(current_search_state => $new_ss); -} - sub find_next_solution { my ($self) = @_; my $state = $self->current_search_state->with_one_step; diff --git a/lib/DX/SearchState.pm b/lib/DX/SearchState.pm index 415b22a..dd0a724 100644 --- a/lib/DX/SearchState.pm +++ b/lib/DX/SearchState.pm @@ -57,11 +57,4 @@ sub with_one_step { return $step->apply_to($self); } -sub force_backtrack { - my ($self) = @_; - return $self->but( - next_step => DX::Step::Backtrack->new, - )->with_one_step; -} - 1;