Skip to content

Fix clippy::uninlined_format_args lint error in tests/preamble.rs #35

@coderabbitai

Description

@coderabbitai

Problem

The codebase fails to compile due to a Clippy lint error for uninlined format arguments. The build treats warnings as errors via -D warnings, causing compilation to fail.

Error Details

error: variables can be used directly in the `format!` string
  --> tests/preamble.rs:39:5
   |
39 |     eprintln!("decoded: {:?}", p);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
   = note: `-D clippy::uninlined-format-args` implied by `-D warnings`

Location

Line 39 in tests/preamble.rs

Current Code

eprintln!("decoded: {:?}", p);

Suggested Fix

eprintln!("decoded: {p:?}");

Context

This prevents the codebase from compiling and blocks CI/testing workflows. The fix is straightforward - update the format string to use the modern inline variable syntax introduced in recent Rust versions.

References

Reported by: @leynos

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions