From: Ewan Higgs Date: Mon, 27 Feb 2017 00:13:07 +0000 (+0100) Subject: Fix for #3722 X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~9^2~120^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7e80c684cad3249923b05ecbe02c009b111d9b9f;p=cargo.git Fix for #3722 When using init, add [[bin]] and [lib] section where appropriate. --- diff --git a/src/cargo/ops/cargo_new.rs b/src/cargo/ops/cargo_new.rs index d211dc3e9..993e85b4d 100644 --- a/src/cargo/ops/cargo_new.rs +++ b/src/cargo/ops/cargo_new.rs @@ -10,6 +10,7 @@ use term::color::BLACK; use handlebars::{Handlebars, no_escape}; use tempdir::TempDir; +use toml; use core::Workspace; use sources::git::clone; @@ -44,6 +45,7 @@ struct MkOptions<'a> { path: &'a Path, name: &'a str, bin: bool, + source_files: Vec, } impl Decodable for VersionControl { @@ -127,11 +129,40 @@ fn get_input_template(config: &Config, opts: &MkOptions) -> CargoResult