fix(lint): resolve clippy question_mark lint in get_session#12
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cargo clippy -- -D warningsstarted failing on unrelated, unchanged code insrc/auth.rs.dtolnay/rust-toolchain@stable(unpinned), so a newer clippy release started flagging aquestion_mark-rewritable pattern that an older clippy didn't.main's last scheduled CI run (July 18) was green; this broke silently asstablemoved forward, with no repo change involved.get_session— replaces theif let ... else { return None }guard with?inside a block. Behavior is unchanged.Test plan
cargo clippy --all-targets --all-features -- -D warnings— cleancargo test— 29 unit + 3 integration tests pass, includingtest_get_nonexistent_session,test_session_timeout,test_cleanup_expired_sessions🤖 Generated with Claude Code