fix: remove redundant references in format macro arguments to satisfy clippy#4872
Closed
andygrove wants to merge 2 commits into
Closed
fix: remove redundant references in format macro arguments to satisfy clippy#4872andygrove wants to merge 2 commits into
andygrove wants to merge 2 commits into
Conversation
The same clippy `useless_borrows_in_formatting` lint that fs-hdfs tripped also fires on the `eval_mode` argument in `Cast`'s `Display` impl. Clippy reports it only after the fs-hdfs fix lets it proceed to `spark-expr`, so both must be fixed together to get `rust-test` green.
Contributor
|
#4840 has the fixes already and should get through CI first. |
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.
Which issue does this PR close?
N/A. This is a small lint fix to unblock CI.
Rationale for this change
A newer Rust/clippy version now flags the
useless_borrows_in_formattinglint (redundant reference in ... argument) in two workspace crates. CI runscargo clippy --all-targets --workspace -- -D warnings, and clippy aborts each crate at its first denied lint, so the two occurrences surface one at a time: fixing only the first lets clippy proceed to the next crate and fail there.The
fs-hdfscrate is a workspace member listed inmembersbut notdefault-members, so local default-member builds do not lint it, which is why this only shows up in CI.What changes are included in this PR?
Remove the redundant
&in two format macro arguments:native/fs-hdfs/src/hdfs.rs:103: thenamenode_uriargument in theinfo!call.native/spark-expr/src/conversion_funcs/cast.rs:735: theeval_modeargument in theCastDisplaywrite!call.How are these changes tested?
cargo clippy --all-targets --workspace -- -D warningspasses end-to-end with these changes and fails without them. Covered by the existingrust-testCI job.