From 453b5597aa7fd960e13bfc6dfe784d5fe1bced51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Cabrera?= Date: Tue, 13 Aug 2024 15:50:06 -0400 Subject: [PATCH] Stylistic changes --- crates/cli/src/commands.rs | 5 +---- crates/cli/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/cli/src/commands.rs b/crates/cli/src/commands.rs index 5b1da5a7..bdac905b 100644 --- a/crates/cli/src/commands.rs +++ b/crates/cli/src/commands.rs @@ -29,10 +29,7 @@ pub enum Command { impl Command { /// Returns true if it is [`Command::Compile`]. pub fn is_compile(&self) -> bool { - match self { - Self::Compile(_) => true, - _ => false, - } + matches!(self, Command::Compile(_)) } } diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index ffbbe492..b5a872b6 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -18,7 +18,7 @@ fn main() -> Result<()> { let args = Cli::parse(); match &args.command { - Command::EmitProvider(opts) => emit_provider(&opts), + Command::EmitProvider(opts) => emit_provider(opts), c @ Command::Compile(opts) | c @ Command::Build(opts) => { if c.is_compile() { println!(