6

write_literal: Fix index of the remaining positional arguments by koka831 · Pull...

 11 months ago
source link: https://github.com/rust-lang/rust-clippy/pull/11576
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

write_literal: Fix index of the remaining positional arguments #11576

Conversation

Contributor

changelog: [print_literal], [write_literal]: Now handles positional argument properly

Collaborator

r? @llogiq

(rustbot has picked a reviewer for you, use r? to override)

rustbot

added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label

Sep 28, 2023

Contributor

Thanks, this looks good to me. I wonder whether we can also inline other literals beside str. For example the last example could well just write the "2", "3" and "4" literals as part of the format string. Anyway,

@bors r+

Contributor

📌 Commit b413bf6 has been approved by llogiq

It is now in the queue for this repository.

Contributor

⌛ Testing commit b413bf6 with merge d18d01a...

Contributor

Author

Found that Lit::Int (which is now Lit::Integer) and Lit::Float had been ignored by #6335.

I'm not sure should we handle this (at least it can be relaxed by checking lit.chars().all(|c| c.is_ascii_digit())).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

llogiq

Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

cargo clippy --fix broken for positional arguments

4 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK