Remove the --file flag, it's no longer needed and conflicts with the -f flag

This commit is contained in:
runebaas 2019-10-31 01:37:57 +01:00
parent 4582432128
commit cc99bd6462
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
2 changed files with 0 additions and 10 deletions

View file

@ -10,13 +10,6 @@ fn main() {
.version("0.1") .version("0.1")
.author("Daan Boerlage <runebaas@gmail.com>") .author("Daan Boerlage <runebaas@gmail.com>")
.about("When fortune is run with no arguments it prints out a random epigram. Epigrams are divided into several categories.") .about("When fortune is run with no arguments it prints out a random epigram. Epigrams are divided into several categories.")
.arg(Arg::with_name("file")
.short("F")
.long("file")
.default_value("fortunes")
.help("The fortune file")
.takes_value(true)
.value_name("file"))
.arg(Arg::with_name("length") .arg(Arg::with_name("length")
.short("n") .short("n")
.long("length") .long("length")

View file

@ -3,7 +3,6 @@ use clap::App;
pub fn parse(app: App) -> Parameters { pub fn parse(app: App) -> Parameters {
let matches = app.get_matches(); let matches = app.get_matches();
let options: Parameters = Parameters { let options: Parameters = Parameters {
filename: matches.value_of("file").unwrap().to_owned(),
length: matches length: matches
.value_of("length") .value_of("length")
.unwrap() .unwrap()
@ -24,8 +23,6 @@ pub fn parse(app: App) -> Parameters {
} }
pub struct Parameters { pub struct Parameters {
pub filename: String,
pub length: usize, pub length: usize,
pub long_fortunes: bool, pub long_fortunes: bool,
pub short_fortunes: bool, pub short_fortunes: bool,