ruff
6e29838d - Avoid redundant pending-indentation writes (#26774)

Commit
101 days ago
Avoid redundant pending-indentation writes (#26774) ## Summary The lexer checks `pending_indentation` for every token. `Option::take` writes `None` even on the common path where no indentation is pending, so we now read the field first and clear it only when a value is present. This avoids a redundant write in the hot lexer loop while preserving the existing indentation behavior. This PR is stacked on #26765 so that CodSpeed can measure the pending-indentation optimization independently. --------- Co-authored-by: Micha Reiser <micha@reiser.io>
Author
Parents
Loading