[rs] Make file arguments required
This commit is contained in:
parent
74dfe69ae6
commit
c9f4e45469
1 changed files with 1 additions and 4 deletions
|
|
@ -45,16 +45,13 @@ days! {
|
|||
|
||||
#[derive(Parser)]
|
||||
struct Args {
|
||||
#[arg(required = true)]
|
||||
files: Vec<PathBuf>,
|
||||
}
|
||||
|
||||
fn main() -> io::Result<()> {
|
||||
let args = Args::parse();
|
||||
|
||||
if args.files.is_empty() {
|
||||
eprintln!("No days specified");
|
||||
}
|
||||
|
||||
let mut first_day = true;
|
||||
for file in args.files {
|
||||
if !first_day {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue