From 2b77593f0872f319e44cc5f0787687adfff98d4b Mon Sep 17 00:00:00 2001 From: quambene Date: Thu, 4 Apr 2024 00:43:47 +0200 Subject: [PATCH] Fix args --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 4a655a1..690d523 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -156,7 +156,7 @@ pub fn app() -> Command { Arg::new(arg::SUBJECT) .long(arg::SUBJECT) .num_args(1) - .required(true) + .required(false) .required_unless_present(arg::MESSAGE_FILE) .help("Subject of the email"), Arg::new(arg::CONTENT) @@ -164,7 +164,7 @@ pub fn app() -> Command { .num_args(1) .required(false) .requires(arg::SUBJECT) - .required_unless_present_all([ + .required_unless_present_any([ arg::MESSAGE_FILE, arg::TEXT_FILE, arg::HTML_FILE, @@ -175,7 +175,7 @@ pub fn app() -> Command { .long(arg::MESSAGE_FILE) .num_args(1) .required(false) - .required_unless_present_all([ + .required_unless_present_any([ arg::SUBJECT, arg::CONTENT, arg::TEXT_FILE,