Skip to content

Commit a0d94ff

Browse files
committed
Add documentation for StringList
1 parent dab42bb commit a0d94ff

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/cargo/util/config/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,6 +1467,16 @@ pub struct CargoBuildConfig {
14671467
pub rustdocflags: Option<StringList>,
14681468
}
14691469

1470+
/// A type to deserialize a list of strings from a toml file.
1471+
///
1472+
/// Supports deserializing either a whitespace-separated list of arguments in a
1473+
/// single string or a string list itself. For example these deserialize to
1474+
/// equivalent values:
1475+
///
1476+
/// ```
1477+
/// a = 'a b c'
1478+
/// b = ['a', 'b', 'c']
1479+
/// ```
14701480
#[derive(Debug)]
14711481
pub struct StringList {
14721482
list: Vec<String>,

0 commit comments

Comments
 (0)