Skip to content

Commit

Permalink
fix bug preventing use of custom ngram file
Browse files Browse the repository at this point in the history
  • Loading branch information
wintermute-cell committed May 21, 2024
1 parent 9921b31 commit 4d45374
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,7 @@ fn get_ngrams(args: &Args) -> Vec<String> {
"3" => ngrams::get_trigrams(),
"4" => ngrams::get_tetragrams(),
"w" => ngrams::get_wordlist(),
"_" => try_get_from_file(&args.n),
&_ => {
println!("Invalid argument for n. Use 2, 3, 4, w or a file path.");
std::process::exit(1);
}
&_ => try_get_from_file(&args.n),
};
ngrams
}
Expand Down

0 comments on commit 4d45374

Please sign in to comment.