From ad9f92e535cdc0ab561b03fde0967a9b41ff90e5 Mon Sep 17 00:00:00 2001 From: eitsupi Date: Thu, 30 Jan 2025 21:47:19 +0900 Subject: [PATCH] refactor(prqlc cli): simplify --- prqlc/prqlc/src/cli/mod.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/prqlc/prqlc/src/cli/mod.rs b/prqlc/prqlc/src/cli/mod.rs index 0b1f675d55de..cee41010a293 100644 --- a/prqlc/prqlc/src/cli/mod.rs +++ b/prqlc/prqlc/src/cli/mod.rs @@ -333,16 +333,7 @@ impl Command { } fn list_targets(&self) -> std::result::Result<(), anyhow::Error> { - let res: Result = Ok(match self { - Command::ListTargets => Target::names().join("\n"), - _ => unreachable!(), - }); - - match res { - Ok(s) => println!("{s}"), - Err(_) => unreachable!(), - } - + println!("{}", Target::names().join("\n")); Ok(()) }