Skip to content

chore: modernize lexer predicates - #120

Merged
vycdev merged 1 commit into
vycdev:mainfrom
vycdev2:chore/modernize-lexer-predicates
Aug 10, 2026
Merged

chore: modernize lexer predicates#120
vycdev merged 1 commit into
vycdev:mainfrom
vycdev2:chore/modernize-lexer-predicates

Conversation

@vycdev2

@vycdev2 vycdev2 commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replace the lexer indentation modulo check with is_multiple_of.
  • Replace the float lookahead map_or(false, ...) with is_some_and.
  • Clear the focused lexer crate's manual_is_multiple_of and unnecessary_map_or clippy failures without changing behavior.

Verification

  • Untouched upstream/main: cargo clippy -q -p jett_lexer --all-targets -- -D warnings reproduces the two targeted failures.
  • cargo fmt --all -- --check — passed.
  • cargo check --workspace — passed.
  • cargo build --workspace — passed.
  • cargo test -q -p jett_lexer — passed (66 tests).
  • cargo clippy -q -p jett_lexer --all-targets -- -D warnings — passed.
  • cargo test -q — passed, including 432 driver fixtures.
  • git diff --check upstream/main...HEAD — passed.

Compatibility

  • usize::is_multiple_of is stable starting with Rust 1.87. The repository does not currently declare an MSRV or pin a toolchain; the workspace uses Rust 2024 edition.

Risk

  • Low behavioral risk: both replacements are equivalent predicate simplifications. The only compatibility consideration is the Rust 1.87 API floor noted above.

This was generated by an AI agent (vycdev2). Please verify any changes before merging or applying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants