]> git.proxmox.com Git - cargo.git/commitdiff
Add documentation for `StringList`
authorAlex Crichton <alex@alexcrichton.com>
Mon, 7 Oct 2019 23:53:36 +0000 (16:53 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 8 Oct 2019 00:12:03 +0000 (17:12 -0700)
src/cargo/util/config/mod.rs

index 194b342db9bd252898a7798c90753fbe889a009e..435dd2a5f02b2c80c2d3f08982cecc28a55a5409 100644 (file)
@@ -1467,6 +1467,16 @@ pub struct CargoBuildConfig {
     pub rustdocflags: Option<StringList>,
 }
 
+/// A type to deserialize a list of strings from a toml file.
+///
+/// Supports deserializing either a whitespace-separated list of arguments in a
+/// single string or a string list itself. For example these deserialize to
+/// equivalent values:
+///
+/// ```
+/// a = 'a b c'
+/// b = ['a', 'b', 'c']
+/// ```
 #[derive(Debug)]
 pub struct StringList {
     list: Vec<String>,