Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
return early if limit hit
  • Loading branch information
midzer committed Feb 26, 2025
commit ab9001a231e992b51a72ddc02b8b0d2f8a46a82c
2 changes: 1 addition & 1 deletion src/scripts/search/kmp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class SearchByKMP<T extends object> implements Searcher<T> {
rank: count + 1,
});
if (++count === this._limit) {
break;
return results;
}
}
}
Expand Down