summaryrefslogtreecommitdiff
path: root/src/bin/subplot.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/subplot.rs')
-rw-r--r--src/bin/subplot.rs25
1 files changed, 5 insertions, 20 deletions
diff --git a/src/bin/subplot.rs b/src/bin/subplot.rs
index 8ede58d..b86c613 100644
--- a/src/bin/subplot.rs
+++ b/src/bin/subplot.rs
@@ -136,13 +136,7 @@ struct Extract {
merciful: bool,
/// Directory to write extracted files to
- #[clap(
- name = "DIR",
- long = "directory",
- short = 'd',
- parse(from_os_str),
- default_value = "."
- )]
+ #[clap(name = "DIR", long = "directory", short = 'd', default_value = ".")]
directory: PathBuf,
/// Don't actually write the files out
@@ -150,7 +144,6 @@ struct Extract {
dry_run: bool,
/// Input subplot document filename
- #[clap(parse(from_os_str))]
filename: PathBuf,
/// Names of embedded files to be extracted.
@@ -202,11 +195,10 @@ struct Metadata {
merciful: bool,
/// Form that you want the output to take
- #[clap(short = 'o', default_value = "plain", possible_values=&["plain", "json"])]
+ #[clap(short = 'o', default_value = "plain")]
output_format: cli::OutputFormat,
/// Input subplot document filename
- #[clap(parse(from_os_str))]
filename: PathBuf,
}
@@ -242,11 +234,10 @@ struct Docgen {
template: Option<String>,
// Input Subplot document
- #[clap(parse(from_os_str))]
input: PathBuf,
// Output document filename
- #[clap(name = "FILE", long = "output", short = 'o', parse(from_os_str))]
+ #[clap(name = "FILE", long = "output", short = 'o')]
output: PathBuf,
// Set date.
@@ -358,16 +349,10 @@ struct Codegen {
template: Option<String>,
/// Input filename.
- #[clap(parse(from_os_str))]
filename: PathBuf,
/// Write generated test program to this file.
- #[clap(
- long,
- short,
- parse(from_os_str),
- help = "Writes generated test program to FILE"
- )]
+ #[clap(long, short, help = "Writes generated test program to FILE")]
output: PathBuf,
/// Run the generated test program after writing it?
@@ -456,7 +441,7 @@ fn real_main() {
info!("Starting Subplot");
let argparser = Toplevel::command();
let version = long_version().unwrap();
- let argparser = argparser.long_version(version.as_str());
+ let argparser = argparser.long_version(version);
let args = argparser.get_matches();
let args = Toplevel::from_arg_matches(&args).unwrap();
args.handle_special_args();