From: Behnam Esfahbod Date: Mon, 7 Aug 2017 16:05:02 +0000 (-0700) Subject: [bin/init] Update USAGE X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~7^2~27^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=18a86b00d2eaad454aba6053456c972d3ae54d95;p=cargo.git [bin/init] Update USAGE --- diff --git a/src/bin/init.rs b/src/bin/init.rs index be02789ec..50afe9bea 100644 --- a/src/bin/init.rs +++ b/src/bin/init.rs @@ -18,7 +18,7 @@ pub struct Options { } pub const USAGE: &'static str = " -Create a new cargo package in current directory +Create a new cargo package in an existing directory Usage: cargo init [options] [] @@ -27,8 +27,9 @@ Usage: Options: -h, --help Print this message --vcs VCS Initialize a new repository for the given version - control system (git or hg) or do not initialize any version - control at all (none) overriding a global configuration. + control system (git, hg, pijul, or fossil) or do not + initialize any version control at all (none), overriding + a global configuration. --bin Use a binary (application) template --lib Use a library template [default] --name NAME Set the resulting package name @@ -49,11 +50,11 @@ pub fn execute(options: Options, config: &Config) -> CliResult { let Options { flag_bin, flag_lib, arg_path, flag_name, flag_vcs, .. } = options; - let tmp = &arg_path.unwrap_or(format!(".")); + let path = &arg_path.unwrap_or(format!(".")); let opts = ops::NewOptions::new(flag_vcs, flag_bin, flag_lib, - tmp, + path, flag_name.as_ref().map(|s| s.as_ref())); let opts_lib = opts.lib;