Bug fix for argument parsing

This commit is contained in:
Sayantan Santra 2022-12-08 22:56:14 -06:00
parent 7e833a4ed0
commit 5ce914bddb

View file

@ -4,7 +4,7 @@ use tmdb::{model::*, themoviedb::*};
use torrent_name_parser::Metadata; use torrent_name_parser::Metadata;
use youchoose; use youchoose;
const VERSION: &str = "1.1.1"; const VERSION: &str = "1.1.2";
// Struct for movie entries // Struct for movie entries
struct MovieEntry { struct MovieEntry {
title: String, title: String,
@ -293,7 +293,7 @@ fn process_args(mut args: Vec<String>) -> (Vec<String>, HashMap<&'static str, bo
exit(0); exit(0);
} }
other => { other => {
if other.contains("-") { if other.starts_with("-") {
eprintln!("Unknown argument passed: {}", other); eprintln!("Unknown argument passed: {}", other);
} else { } else {
entries.push(arg); entries.push(arg);