Skip to content

fix(lint): resolve clippy question_mark lint in get_session#12

Merged
mikejgray merged 1 commit into
mainfrom
fix/clippy-question-mark-lint
Jul 21, 2026
Merged

fix(lint): resolve clippy question_mark lint in get_session#12
mikejgray merged 1 commit into
mainfrom
fix/clippy-question-mark-lint

Conversation

@mikejgray

Copy link
Copy Markdown
Contributor

Summary

  • Unblocks CI on chore(deps): bump serde_with from 3.14.0 to 3.21.0 in the cargo group across 1 directory #11 (Dependabot serde_with bump) and any future PR — cargo clippy -- -D warnings started failing on unrelated, unchanged code in src/auth.rs.
  • Root cause: CI uses dtolnay/rust-toolchain@stable (unpinned), so a newer clippy release started flagging a question_mark-rewritable pattern that an older clippy didn't. main's last scheduled CI run (July 18) was green; this broke silently as stable moved forward, with no repo change involved.
  • Applies clippy's own suggested rewrite in get_session — replaces the if let ... else { return None } guard with ? inside a block. Behavior is unchanged.

Test plan

  • cargo clippy --all-targets --all-features -- -D warnings — clean
  • cargo test — 29 unit + 3 integration tests pass, including test_get_nonexistent_session, test_session_timeout, test_cleanup_expired_sessions

🤖 Generated with Claude Code

CI's toolchain (dtolnay/rust-toolchain@stable, unpinned) picked up a
newer clippy that now flags this pattern under -D warnings, breaking
CI for any PR touching this repo -- including unrelated Dependabot
bumps. Applies clippy's own suggested rewrite; behavior unchanged
(verified via existing test coverage: test_get_nonexistent_session,
test_session_timeout, test_cleanup_expired_sessions all pass).
@mikejgray
mikejgray merged commit c5fbab0 into main Jul 21, 2026
5 checks passed
@mikejgray
mikejgray deleted the fix/clippy-question-mark-lint branch July 21, 2026 01:53
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.

1 participant