Closed pansila closed 3 years ago
struct Opt { #[structopt(short, long)] debug: bool, #[structopt(name = "URL", required_unless("register"))] url: String, #[structopt(short, long, help = "Register as the default web browser")] register: bool, }
$ cargo run -- --register thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src\main.rs:24:10
Should use url: Option\<String> instead.