Send the links attribute to the registry
authorEh2406 <YeomanYaacov@gmail.com>
Sun, 28 Jan 2018 04:01:57 +0000 (23:01 -0500)
committerEh2406 <YeomanYaacov@gmail.com>
Sun, 28 Jan 2018 04:01:57 +0000 (23:01 -0500)
src/cargo/core/manifest.rs
src/cargo/ops/registry.rs
src/cargo/util/toml/mod.rs
src/crates-io/lib.rs

index ad85eb0b7f4b7f06d35847e8240d61650e770ad1..fa6909bd3cfe406c28af9b94edff9e1fdca2aadc 100644 (file)
@@ -77,6 +77,7 @@ pub struct ManifestMetadata {
     pub repository: Option<String>,     // url
     pub documentation: Option<String>,  // url
     pub badges: BTreeMap<String, BTreeMap<String, String>>,
+    pub links: Option<String>,
 }
 
 #[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
index 530519f60156613d4cb53258adcf97232ef7b484..90c386839cf0f5459dc31ef7dff757586326418a 100644 (file)
@@ -159,7 +159,7 @@ fn transmit(config: &Config,
     let ManifestMetadata {
         ref authors, ref description, ref homepage, ref documentation,
         ref keywords, ref readme, ref repository, ref license, ref license_file,
-        ref categories, ref badges,
+        ref categories, ref badges, ref links,
     } = *manifest.metadata();
     let readme_content = match *readme {
         Some(ref readme) => Some(paths::read(&pkg.root().join(readme))?),
@@ -194,6 +194,7 @@ fn transmit(config: &Config,
         license: license.clone(),
         license_file: license_file.clone(),
         badges: badges.clone(),
+        links: links.clone(),
     }, tarball);
 
     match publish {
index fddd6ccd30808fa90099d14999fd3aa46ce63f34..4a1366e0fb2d7c2c100c70e0ff3dde7b4c7cdebf 100644 (file)
@@ -685,6 +685,7 @@ impl TomlManifest {
             keywords: project.keywords.clone().unwrap_or_default(),
             categories: project.categories.clone().unwrap_or_default(),
             badges: me.badges.clone().unwrap_or_default(),
+            links: project.links.clone(),
         };
 
         let workspace_config = match (me.workspace.as_ref(),
index be28498477985be56fdfd5634c1f0d1c64be58b3..19d3e700c605004a6648ecacdf8dcf209e88232f 100644 (file)
@@ -55,6 +55,8 @@ pub struct NewCrate {
     pub license_file: Option<String>,
     pub repository: Option<String>,
     pub badges: BTreeMap<String, BTreeMap<String, String>>,
+    #[serde(default)]
+    pub links: Option<String>,
 }
 
 #[derive(Serialize)]