aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@cardoe.com>2017-04-16 00:56:50 -0500
committerDoug Goldstein <cardoe@cardoe.com>2017-04-17 09:05:15 -0500
commit0042fac7466562632dda830749b2c4b7c55782cb (patch)
tree2f018954cf2453c5afdf1ddf2c057f25e8a20f07
parentupdate Cargo.toml for new fields (diff)
downloadcargo-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.
-rw-r--r--src/main.rs10
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<()>> {