fix(tests): silence clippy unused-variable to unblock CI #38

Merged
nrupard merged 1 commit from fix/clippy-unused-app-RUS-3 into main 2026-06-12 17:54:41 +02:00
Owner

What

The check.yml CI workflow added in #36 runs cargo clippy with -D warnings. That promotes a pre-existing unused_variables lint in main to a hard error, so #36's CI fails at the clippy step even after the fmt debt was cleared by #37.

The offending code is in the shorten_same_url_twice_returns_same_code test in src/handlers/urls.rs: the shorten closure binds app: &_ but never reads it. This fix prefixes the binding with an underscore (_app) per clippy's own suggestion. Behavior is unchanged.

Context

Companion to #37 (fmt). #36 introduced the repo's first CI and surfaced two latent issues in main: formatting (fixed by #37) and this clippy warning. With both merged, #36 needs one more sync with main and its CI should go green.

Verification

CI on this branch is the source of truth for whether clippy is now clean (no local cargo available). If clippy halts on a further warning, a follow-up commit will address it.

#RUS-3

## What The `check.yml` CI workflow added in #36 runs `cargo clippy` with `-D warnings`. That promotes a pre-existing `unused_variables` lint in `main` to a hard error, so #36's CI fails at the clippy step even after the fmt debt was cleared by #37. The offending code is in the `shorten_same_url_twice_returns_same_code` test in `src/handlers/urls.rs`: the `shorten` closure binds `app: &_` but never reads it. This fix prefixes the binding with an underscore (`_app`) per clippy's own suggestion. Behavior is unchanged. ## Context Companion to #37 (fmt). #36 introduced the repo's first CI and surfaced two latent issues in `main`: formatting (fixed by #37) and this clippy warning. With both merged, #36 needs one more sync with `main` and its CI should go green. ## Verification CI on this branch is the source of truth for whether clippy is now clean (no local cargo available). If clippy halts on a further warning, a follow-up commit will address it. #RUS-3
fix(tests): silence clippy unused-variable in shorten closure
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
5a81e88279
The check.yml CI introduced in #36 runs `cargo clippy` with `-D warnings`, which promotes a pre-existing `unused_variables` lint in the `shorten_same_url_twice_returns_same_code` test to a hard error: the `shorten` closure binds `app: &_` but never uses it. Prefix the binding with an underscore (`_app`) per clippy's own suggestion. Test behavior is unchanged. Companion to the fmt cleanup in #37; together they unblock #36's CI.

#RUS-3
nrupard deleted branch fix/clippy-unused-app-RUS-3 2026-06-12 17:54:41 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
a8n-tools/rus!38
No description provided.