Skip to content
Discussion options

You must be logged in to vote

If you don't care about None but ok with false, you can do

    #[arg(short = 'k', long, env = "APP_INSECURE")]
    pub insecure: bool,

If you really need None, then that is the way to do it. The one change I would make is I would do num_args=0

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@donatello
Comment options

@donatello
Comment options

@epage
Comment options

epage Nov 7, 2024
Maintainer

Answer selected by donatello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants