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 TODO in FSTCompiler#freezeTail. #13923

Open
wants to merge 2 commits into
base: main
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
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,8 @@ private void freezeTail(int prefixLenPlus1) throws IOException {
// FSTEnum, Util, etc., have trouble w/ non-final
// dead-end states:

// TODO: is node.numArcs == 0 always false? we no longer prune any nodes from FST:
// node.numArcs == 0 happens on last node. But it is final, we still can remove node.numArcs
// == 0.
final boolean isFinal = node.isFinal || node.numArcs == 0;

// this node makes it and we now compile it. first,
Expand Down
Loading