From 3879d2fe5a951a6043ec52853f79ee756c5ad355 Mon Sep 17 00:00:00 2001 From: Adarsh Shah Date: Sun, 10 Dec 2023 19:08:52 -0500 Subject: [PATCH] using ? instead of match --- tembo-cli/src/cmd/apply.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tembo-cli/src/cmd/apply.rs b/tembo-cli/src/cmd/apply.rs index 1a498b2b0..1b49b53d7 100644 --- a/tembo-cli/src/cmd/apply.rs +++ b/tembo-cli/src/cmd/apply.rs @@ -110,16 +110,7 @@ pub fn execute_tembo_cloud(env: Environment) -> Result<()> { } pub fn get_instance_id_from_state(instance_name: String) -> Result> { - let contents = match fs::read_to_string(tembo_state_file_path()) { - Ok(c) => c, - Err(e) => { - panic!( - "Couldn't read context file {}: {}", - tembo_state_file_path(), - e - ); - } - }; + let contents = fs::read_to_string(tembo_state_file_path())?; let tembo_state_map: HashMap = toml::from_str(&contents)?;