transmit: send README filename as well as content
authorAshe Connor <ashe@kivikakk.ee>
Tue, 17 Oct 2017 05:04:33 +0000 (16:04 +1100)
committerAshe Connor <ashe@kivikakk.ee>
Tue, 17 Oct 2017 05:04:34 +0000 (16:04 +1100)
src/cargo/ops/registry.rs
src/crates-io/lib.rs

index 42ff2f872076205f06e18edbc5d054265d20145b..173f1584ce6ae3e0ae3b2f42870ebb2467252ae8 100644 (file)
@@ -119,7 +119,7 @@ fn transmit(config: &Config,
         ref keywords, ref readme, ref repository, ref license, ref license_file,
         ref categories, ref badges,
     } = *manifest.metadata();
-    let readme = match *readme {
+    let readme_content = match *readme {
         Some(ref readme) => Some(paths::read(&pkg.root().join(readme))?),
         None => None,
     };
@@ -146,7 +146,8 @@ fn transmit(config: &Config,
         documentation: documentation.clone(),
         keywords: keywords.clone(),
         categories: categories.clone(),
-        readme: readme,
+        readme: readme_content,
+        readme_file: readme.clone(),
         repository: repository.clone(),
         license: license.clone(),
         license_file: license_file.clone(),
index 910d51a3730d25506403d3ac413abadb3ecf7e13..4ccfea2d8a9ead3b835af2446d5abb6a8f258deb 100644 (file)
@@ -82,6 +82,7 @@ pub struct NewCrate {
     pub documentation: Option<String>,
     pub homepage: Option<String>,
     pub readme: Option<String>,
+    pub readme_file: Option<String>,
     pub keywords: Vec<String>,
     pub categories: Vec<String>,
     pub license: Option<String>,