


























1
Hello
I need help with my code. The idea is to accept multiple repository names; I’ve set this up as a flag, but I want it to allow me to accept multiple names in a single run. I’m using clap.
use clap::Parser;
#[derive(Parser, Debug)]
#[doc = "This struct for creating commands"]
pub struct CommandUsername {
pub user_name_github: String,
#[arg(short, long, required = false)]
pub creation_pdf: bool,
#[arg(short, long)]
pub name_repository: Option<String>,
}
Thank you very much
kpreid 2
Use Vec<String> instead of Option<String>.
proRust 3
Thank you very much
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。