Skip to content

[#65] Fix clippy lints from a fresh dependency resolution - #66

Merged
heitor-lassarote merged 1 commit into
masterfrom
heitor-lassarote/#65-fresh-resolution-clippy
Oct 14, 2026
Merged

heitor-lassarote merged 1 commit into
masterfrom
heitor-lassarote/#65-fresh-resolution-clippy

Conversation

@heitor-lassarote

Copy link
Copy Markdown
Member

Description

Without the committed Cargo.lock, dependencies resolve to log 0.4.34 and chrono 0.4.45. Against those, pedantic clippy reports 20 errors that don't fire against the committed lockfile: inlined-format-args and unnecessary_debug_formatting/to_string_in_format_args lints against log's macros, and one chrono::NaiveDateTime::from_timestamp_opt deprecation.

cargo clippy runs in nix build (doCheck, turned on in #59), so a cargo update that picks up newer log/chrono would break CI. This makes it pass either way, with no behaviour change.

This is stacked on #63 (and so on #61 and #59). Once those are merged, this PR's base becomes master.

Related issue(s)

Resolves #65

Notes for reviewers

  • Verified clippy passes with both the committed Cargo.lock and a freshly generated one; Cargo.lock itself is untouched.
  • nix build, which runs the tests and pedantic clippy, passes.

@heitor-lassarote heitor-lassarote self-assigned this Sep 28, 2026
@heitor-lassarote
heitor-lassarote marked this pull request as ready for review September 28, 2026 16:50
@heitor-lassarote
heitor-lassarote force-pushed the heitor-lassarote/#65-fresh-resolution-clippy branch from 677a858 to 8745e00 Compare September 28, 2026 18:08
Comment thread src/git.rs Resolved
@heitor-lassarote
heitor-lassarote force-pushed the heitor-lassarote/#65-fresh-resolution-clippy branch from 8745e00 to 2ed9883 Compare October 9, 2026 16:38
@heitor-lassarote
heitor-lassarote force-pushed the heitor-lassarote/#65-fresh-resolution-clippy branch 3 times, most recently from 963cad7 to 0912309 Compare October 14, 2026 13:49
Base automatically changed from heitor-lassarote/#62-octocrab-0.19 to master October 14, 2026 13:49
Problem: without the committed Cargo.lock, dependencies resolve to
log 0.4.34 and chrono 0.4.45, instead of the locked 0.4.21 and 0.4.34.
Against those, pedantic clippy reports 20 errors that do not fire
against the committed lockfile: `uninlined_format_args`,
`unnecessary_debug_formatting` and `to_string_in_format_args` in
existing debug!/info!/warn!/error! calls, and one use of
`chrono::NaiveDateTime::from_timestamp_opt`, deprecated in chrono
0.4.39.

Solution: fix them without changing behaviour. `from_timestamp_opt`
becomes `chrono::DateTime::from_timestamp(..).unwrap().naive_utc()`,
its documented replacement. The rest are inlined format arguments and
a redundant `.to_string()`. Verified clippy passes both with the
committed lockfile and with a freshly generated one.
@heitor-lassarote
heitor-lassarote force-pushed the heitor-lassarote/#65-fresh-resolution-clippy branch from 0912309 to 5ac1e4c Compare October 14, 2026 13:50
@heitor-lassarote
heitor-lassarote merged commit 33ebdd6 into master Oct 14, 2026
1 check passed
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.

Pedantic clippy fails on a fresh dependency resolution

2 participants