Drop nested list variable in command
The enum variant is the value this code-path requires. The inner bool doesn't do anything, so it can go away.
This commit is contained in:
@@ -14,8 +14,5 @@ pub struct Args {
|
|||||||
|
|
||||||
#[derive(Subcommand, Debug)]
|
#[derive(Subcommand, Debug)]
|
||||||
pub enum Commands {
|
pub enum Commands {
|
||||||
ListReleases {
|
ListReleases,
|
||||||
#[arg(short, long)]
|
|
||||||
list: bool,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ async fn main() -> Result<(), Error> {
|
|||||||
let args = Args::parse();
|
let args = Args::parse();
|
||||||
|
|
||||||
match args.command {
|
match args.command {
|
||||||
gt_tools::cli::Commands::ListReleases { list } => {
|
gt_tools::cli::Commands::ListReleases => {
|
||||||
let request_url = format!(
|
let request_url = format!(
|
||||||
"http:/localhost:3000/api/v1/repos/{owner}/{repo}/releases",
|
"http:/localhost:3000/api/v1/repos/{owner}/{repo}/releases",
|
||||||
owner = "robert",
|
owner = "robert",
|
||||||
|
|||||||
Reference in New Issue
Block a user