From 76a69b4cb8e72602eb84bbca51076fc9f23b7b18 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Tue, 17 Oct 2017 16:04:33 +1100 Subject: [PATCH] transmit: send README filename as well as content --- src/cargo/ops/registry.rs | 5 +++-- src/crates-io/lib.rs | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cargo/ops/registry.rs b/src/cargo/ops/registry.rs index 42ff2f872..173f1584c 100644 --- a/src/cargo/ops/registry.rs +++ b/src/cargo/ops/registry.rs @@ -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(), diff --git a/src/crates-io/lib.rs b/src/crates-io/lib.rs index 910d51a37..4ccfea2d8 100644 --- a/src/crates-io/lib.rs +++ b/src/crates-io/lib.rs @@ -82,6 +82,7 @@ pub struct NewCrate { pub documentation: Option, pub homepage: Option, pub readme: Option, + pub readme_file: Option, pub keywords: Vec, pub categories: Vec, pub license: Option,