diff options
author | 2017-04-16 00:56:50 -0500 | |
---|---|---|
committer | 2017-04-17 09:05:15 -0500 | |
commit | 0042fac7466562632dda830749b2c4b7c55782cb (patch) | |
tree | 2f018954cf2453c5afdf1ddf2c057f25e8a20f07 /src | |
parent | update Cargo.toml for new fields (diff) | |
download | cargo-ebuild-0042fac7466562632dda830749b2c4b7c55782cb.tar.gz cargo-ebuild-0042fac7466562632dda830749b2c4b7c55782cb.tar.bz2 cargo-ebuild-0042fac7466562632dda830749b2c4b7c55782cb.zip |
move usage into its own variable
Rather than defining the usage in place move it into its own variable
for future flexibility.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs index d28fedb..f0f21b2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -54,10 +54,7 @@ struct Options { flag_quiet: Option<bool>, } -fn main() { - cargo::execute_main_without_stdin(real_main, - false, - r#" +const USAGE: &'static str = r#" Create an ebuild for a project Usage: @@ -67,7 +64,10 @@ Options: -h, --help Print this message -v, --verbose Use verbose output -q, --quiet No output printed to stdout -"#) +"#; + +fn main() { + cargo::execute_main_without_stdin(real_main, false, USAGE) } fn real_main(options: Options, config: &Config) -> CliResult<Option<()>> { |