Skip to content

Commit 20f2828

Browse files
committed
style-guide: Update cargo.md for authors being optional and not recommended
Change an example using the authors field to use a long feature list instead. Change the conventions for the authors field to say "if present".
1 parent c5f8b2c commit 20f2828

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/doc/style-guide/src/cargo.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,17 @@ not indent any key names; start all key names at the start of a line.
2525
Use multi-line strings (rather than newline escape sequences) for any string
2626
values that include multiple lines, such as the crate description.
2727

28-
For array values, such as a list of authors, put the entire list on the same
28+
For array values, such as a list of features, put the entire list on the same
2929
line as the key, if it fits. Otherwise, use block indentation: put a newline
3030
after the opening square bracket, indent each item by one indentation level,
3131
put a comma after each item (including the last), and put the closing square
3232
bracket at the start of a line by itself after the last item.
3333

3434
```rust
35-
authors = [
36-
"A Uthor <[email protected]>",
37-
"Another Author <[email protected]>",
35+
some_feature = [
36+
"another_feature",
37+
"yet_another_feature",
38+
"some_dependency?/some_feature",
3839
]
3940
```
4041

@@ -54,11 +55,11 @@ version = "4.5.6"
5455

5556
## Metadata conventions
5657

57-
The authors list should consist of strings that each contain an author name
58-
followed by an email address in angle brackets: `Full Name <email@address>`.
59-
It should not contain bare email addresses, or names without email addresses.
60-
(The authors list may also include a mailing list address without an associated
61-
name.)
58+
The authors list, if present, should consist of strings that each contain an
59+
author name followed by an email address in angle brackets: `Full Name
60+
<email@address>`. It should not contain bare email addresses, or names without
61+
email addresses. (The authors list may also include a mailing list address
62+
without an associated name.)
6263

6364
The license field must contain a valid [SPDX
6465
expression](https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60),

0 commit comments

Comments
 (0)