Skip to content

Conversation

nnethercote
Copy link
Contributor

@nnethercote nnethercote commented Aug 27, 2025

The Cargo style guide says to put dependencies on a single line if they fit.

r? @jdonszelmann

The Cargo style guide says to put dependencies on a single line if they
fit.
@rustbot

This comment was marked as outdated.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 27, 2025
@nnethercote
Copy link
Contributor Author

I noticed this when working on the follow-up to #145740. The [dependencies.foo] form is annoying, because it's rare and different, and easy to overlook when grepping.

The Cargo style guide gives this example:

[dependencies.extremely_long_crate_name_goes_here]
path = "extremely_long_path_name_goes_right_here"
version = "4.5.6"

I wish it instead was this:

extremely_long_crate_name_goes_here = {
    path = "extremely_long_path_name_goes_right_here",
    version = "4.5.6"
}

Seems silly to require an entirely different syntax when something doesn't fit on a single line :(

@rustbot rustbot assigned jdonszelmann and unassigned Kobzol Aug 27, 2025
@jdonszelmann
Copy link
Contributor

Oh I completely agree with this, I try to use the table syntax as little as possible. And indeed if it just fits it feels like a no brainer. Awesome!

Tidy already passed and I don't see how any other ci step could be broken by this so I'll just r+ it directly :)

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 27, 2025

📌 Commit b4c8fe2 has been approved by jdonszelmann

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 27, 2025
bors added a commit that referenced this pull request Aug 28, 2025
Rollup of 5 pull requests

Successful merges:

 - #145382 (Add assembly test for `-Zreg-struct-return` option)
 - #145746 (Fix STD build failing for target_os = "espidf")
 - #145826 (Use AcceptContext in AttribueParser::check_target)
 - #145894 (Ensure the coordinator thread terminates before its channels drop)
 - #145946 (Remove unnecessary `[dependencies.unicode-properties]` entries.)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 27d6005 into rust-lang:master Aug 28, 2025
10 checks passed
rust-timer added a commit that referenced this pull request Aug 28, 2025
Rollup merge of #145946 - nnethercote:cargo-style, r=jdonszelmann

Remove unnecessary `[dependencies.unicode-properties]` entries.

The Cargo style guide says to put dependencies on a single line if they fit.

r? `@jdonszelmann`
@rustbot rustbot added this to the 1.91.0 milestone Aug 28, 2025
@nnethercote nnethercote changed the title Remove unnecessary [dependencies.unicode-properties] entries. Remove unnecessary [dependencies.*] entries. Aug 28, 2025
@nnethercote nnethercote deleted the cargo-style branch August 28, 2025 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants