feat: with impl into
Some checks failed
continuous-integration/drone/push Build is failing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2023-11-27 20:19:50 +01:00
parent bda242422d
commit 30587b2f97
Signed by: kjuulh
GPG Key ID: 57B6E1465221F912

View File

@ -46,14 +46,17 @@ impl CuddleCI {
self self
} }
pub async fn execute(&mut self, args: impl IntoIterator<Item = &str>) -> eyre::Result<()> { pub async fn execute(
&mut self,
args: impl IntoIterator<Item = impl Into<String>>,
) -> eyre::Result<()> {
let matches = clap::Command::new("cuddle-ci") let matches = clap::Command::new("cuddle-ci")
.about("is a wrapper around common CI actions") .about("is a wrapper around common CI actions")
.subcommand(clap::Command::new("pr")) .subcommand(clap::Command::new("pr"))
.subcommand(clap::Command::new("main")) .subcommand(clap::Command::new("main"))
.subcommand(clap::Command::new("release")) .subcommand(clap::Command::new("release"))
.subcommand_required(true) .subcommand_required(true)
.try_get_matches_from(args.into_iter())?; .try_get_matches_from(args.into_iter().map(|a| a.into()).collect::<Vec<String>>())?;
match matches.subcommand() { match matches.subcommand() {
Some((name, args)) => match (name, args) { Some((name, args)) => match (name, args) {