1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-12 15:55:43 +02:00

cargo*: add option placeholders and fix some syntax (#17270)

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
This commit is contained in:
Managor 2025-07-20 18:41:22 +03:00 committed by GitHub
parent 701b0ab50e
commit d0a4ac3bc4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 17 additions and 17 deletions

View file

@ -13,7 +13,7 @@
- Add a dependency and enable one or more specific features:
`cargo add {{dependency}} --features {{feature_1}},{{feature_2}}`
`cargo add {{dependency}} {{[-F|--features]}} {{feature_1}},{{feature_2}}`
- Add an optional dependency, which then gets exposed as a feature of the crate:

View file

@ -13,7 +13,7 @@
- Remove release artifacts (the `target/release` directory):
`cargo clean --release`
`cargo clean {{[-r|--release]}}`
- Remove artifacts in the directory of the given profile (in this case, `target/debug`):

View file

@ -21,15 +21,15 @@
- Run checks for a lint group (see <https://rust-lang.github.io/rust-clippy/stable/index.html#?groups=cargo,complexity,correctness,deprecated,nursery,pedantic,perf,restriction,style,suspicious>):
`cargo clippy -- --warn clippy::{{lint_group}}`
`cargo clippy -- {{[-W|--warn]}} clippy::{{lint_group}}`
- Treat warnings as errors:
`cargo clippy -- --deny warnings`
`cargo clippy -- {{[-D|--deny]}} warnings`
- Run checks and ignore warnings:
`cargo clippy -- --allow warnings`
`cargo clippy -- {{[-A|--allow]}} warnings`
- Apply Clippy suggestions automatically:

View file

@ -5,15 +5,15 @@
- Invite the given user or team as an owner:
`cargo owner --add {{username|github:org_name:team_name}} {{crate}}`
`cargo owner {{[-a|--add]}} {{username|github:org_name:team_name}} {{crate}}`
- Remove the given user or team as an owner:
`cargo owner --remove {{username|github:org_name:team_name}} {{crate}}`
`cargo owner {{[-r|--remove]}} {{username|github:org_name:team_name}} {{crate}}`
- List owners of a crate:
`cargo owner --list {{crate}}`
`cargo owner {{[-l|--list]}} {{crate}}`
- Use the specified registry (registry names can be defined in the configuration - the default is <https://crates.io>):

View file

@ -10,4 +10,4 @@
- Display what files would be included in the tarball without actually creating it:
`cargo package --list`
`cargo package {{[-l|--list]}}`

View file

@ -10,7 +10,7 @@
- Perform checks, create a `.crate` file but don't upload it (equivalent of `cargo package`):
`cargo publish --dry-run`
`cargo publish {{[-n|--dry-run]}}`
- Use the specified registry (registry names can be defined in the configuration - the default is <https://crates.io>):

View file

@ -3,14 +3,14 @@
> Display various kinds of reports.
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-report.html>.
- Display a report:
- Display a report of crates which will eventually stop compiling:
`cargo report {{future-incompatibilities|...}}`
`cargo report future-incompatibilities`
- Display a report with the specified Cargo-generated ID:
`cargo report {{future-incompatibilities|...}} --id {{id}}`
`cargo report future-incompatibilities --id {{id}}`
- Display a report for the specified package:
`cargo report {{future-incompatibilities|...}} --package {{package}}`
`cargo report future-incompatibilities {{[-p|--package]}} {{package}}`

View file

@ -22,4 +22,4 @@
- Only show normal/build/development dependencies:
`cargo tree --edges {{normal|build|dev}}`
`cargo tree {{[-e|--edges]}} {{normal|build|dev}}`

View file

@ -9,7 +9,7 @@
- Display what would be updated, but don't actually write the lockfile:
`cargo update --dry-run`
`cargo update {{[-n|--dry-run]}}`
- Update only the specified dependencies:

View file

@ -9,4 +9,4 @@
- Display additional build information:
`cargo version --verbose`
`cargo version {{[-v|--verbose]}}`