Skip to content

Commit

Permalink
using ? instead of match
Browse files Browse the repository at this point in the history
  • Loading branch information
shahadarsh committed Dec 11, 2023
1 parent 417692b commit 3879d2f
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions tembo-cli/src/cmd/apply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,7 @@ pub fn execute_tembo_cloud(env: Environment) -> Result<()> {
}

pub fn get_instance_id_from_state(instance_name: String) -> Result<Option<String>> {
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<String, String> = toml::from_str(&contents)?;

Expand Down

0 comments on commit 3879d2f

Please sign in to comment.