If Ok() assign to variable else print

Hi, I feel stupid for not being able to figure it out but I'm trying something like this:

let args: clap::Argmatches = parse_args();
let matches = match args.try_get_matches() {
    Ok(m) => m,
    Err(e) => println!("{}", e),

This won't work because the return types for both arms don't match but I can't seem to figure out a way for doing this correctly. Can someone help me? I explicitly want to not return the error that may arise.

Never mind I figured it out. I'm just too tired to think straight at the moment...
I call this within a loop and just adding continue will do the trick.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.