Skip to content

Commit

Permalink
fix: remove unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
marktoda committed Feb 4, 2025
1 parent e9fa5c5 commit 9dca10b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl Chainz {
let instance = self.instantiate_chain(&definition).await?;
self.active_chains.insert(name.clone(), instance);
}
Ok(self.active_chains.get(&name).unwrap().clone())
Ok(self.active_chains.get(&name).expect("Unable to get chain")().clone())

Check failure on line 54 in src/config.rs

View workflow job for this annotation

GitHub Actions / Test Suite

expected function, found `&ChainInstance`

Check failure on line 54 in src/config.rs

View workflow job for this annotation

GitHub Actions / Check

expected function, found `&ChainInstance`

Check failure on line 54 in src/config.rs

View workflow job for this annotation

GitHub Actions / Lints

expected function, found `&chain::ChainInstance`
}

async fn instantiate_chain(&self, def: &ChainDefinition) -> Result<ChainInstance> {
Expand Down

0 comments on commit 9dca10b

Please sign in to comment.