From ecc03ecfad3652949c417757cf3416408263da2d Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Fri, 7 Jul 2023 14:38:48 -0400 Subject: [PATCH] xtask: destructure --- xtask/src/main.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 81f3e658..d0a8e333 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -24,15 +24,14 @@ enum Command { } fn main() { - let opts = XtaskOptions::parse(); + let XtaskOptions { command } = Parser::parse(); - use Command::*; - let ret = match opts.command { - Codegen(opts) => codegen::codegen(opts), - Docs => docs::docs(), - BuildIntegrationTest(opts) => build_test::build_test(opts), - BuildIntegrationTestEbpf(opts) => build_ebpf::build_ebpf(opts), - IntegrationTest(opts) => run::run(opts), + let ret = match command { + Command::Codegen(opts) => codegen::codegen(opts), + Command::Docs => docs::docs(), + Command::BuildIntegrationTest(opts) => build_test::build_test(opts), + Command::BuildIntegrationTestEbpf(opts) => build_ebpf::build_ebpf(opts), + Command::IntegrationTest(opts) => run::run(opts), }; if let Err(e) = ret {