From b0d39433d70b37060f9a5a0ff01db2698f73bcd2 Mon Sep 17 00:00:00 2001 From: Ranadeep Biswas Date: Tue, 30 Apr 2024 21:22:57 +0200 Subject: [PATCH] infallible try_into --- ibc-testkit/src/testapp/ibc/core/client_ctx.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ibc-testkit/src/testapp/ibc/core/client_ctx.rs b/ibc-testkit/src/testapp/ibc/core/client_ctx.rs index 839a00ce1..8c7bd8dd2 100644 --- a/ibc-testkit/src/testapp/ibc/core/client_ctx.rs +++ b/ibc-testkit/src/testapp/ibc/core/client_ctx.rs @@ -90,9 +90,7 @@ where client_id: &ClientId, height: &Height, ) -> Result, ContextError> { - let path = format!("clients/{client_id}/consensusStates") - .try_into() - .expect("Must be valid path: ClientId and height are valid Identifiers"); + let path = format!("clients/{client_id}/consensusStates").into(); let keys = self.store.get_keys(&path); let found_path = keys.into_iter().find_map(|path| { @@ -125,9 +123,7 @@ where client_id: &ClientId, height: &Height, ) -> Result, ContextError> { - let path = format!("clients/{client_id}/consensusStates") - .try_into() - .expect("Must be valid path: ClientId and height are valid Identifiers"); + let path = format!("clients/{client_id}/consensusStates").into(); let keys = self.store.get_keys(&path); let found_path = keys.into_iter().rev().find_map(|path| {