Skip to content

chore: fix clippy warnings on cargo update#1744

Merged
ogenev merged 2 commits into
ethereum:masterfrom
ogenev:fix-clippy-cargo-update
Apr 4, 2025
Merged

chore: fix clippy warnings on cargo update#1744
ogenev merged 2 commits into
ethereum:masterfrom
ogenev:fix-clippy-cargo-update

Conversation

@ogenev
Copy link
Copy Markdown
Member

@ogenev ogenev commented Apr 3, 2025

What was wrong?

Clippy check fails on the automatic weekly cargo update action: #1737

How was it fixed?

  • Run cargo update manually
  • Fix clippy warnings

To-Do

@ogenev ogenev requested a review from Copilot April 3, 2025 09:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses Clippy warnings encountered during the weekly cargo update by updating format strings in log messages.

  • Update format string syntax across log messages in the light-client RPC and client modules
  • Replace traditional formatting placeholders with in-string interpolation

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
crates/light-client/src/rpc.rs Updated the log message string interpolation style
crates/light-client/src/client.rs Updated log messages to use in-string interpolation for errors and checkpoint responses
Comments suppressed due to low confidence (1)

crates/light-client/src/client.rs:417

  • Consider using debug formatting (i.e. {checkpoint:?}) if the checkpoint is intended to be formatted with Debug, to preserve the original output style.
info!("external fallbacks responded with checkpoint {checkpoint}",);

Comment thread crates/light-client/src/client.rs Outdated
Comment on lines 383 to 384
info!("external fallbacks responded with checkpoint 0x{checkpoint}",);

Copy link

Copilot AI Apr 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using debug formatting (i.e. {checkpoint:?}) instead of the default display formatting if checkpoint requires Debug output, to match previous behavior.

Suggested change
info!("external fallbacks responded with checkpoint 0x{checkpoint}",);
info!("external fallbacks responded with checkpoint 0x{checkpoint:?}",);

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, we don't require debug output.

@ogenev ogenev marked this pull request as ready for review April 3, 2025 09:59
@ogenev ogenev requested review from KolbyML and morph-dev April 3, 2025 10:00
Copy link
Copy Markdown
Member

@KolbyML KolbyML left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: looks good

Comment thread crates/light-client/src/client.rs Outdated
Comment thread crates/light-client/src/client.rs Outdated
@ogenev ogenev force-pushed the fix-clippy-cargo-update branch from bd9d6c9 to 3cc149f Compare April 4, 2025 09:26
@ogenev ogenev merged commit 49336d0 into ethereum:master Apr 4, 2025
@ogenev ogenev deleted the fix-clippy-cargo-update branch April 4, 2025 09:38
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.

3 participants