Skip to content

Commit

Permalink
optimize impl
Browse files Browse the repository at this point in the history
  • Loading branch information
rnbguy committed Feb 6, 2025
1 parent a1490ef commit e3f7fc0
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ impl Transformer for EncodeClientStatus {
}
}

impl From<CometClientState> for Any {
impl From<CometClientState> for IbcCometClientState {
fn from(client_state: CometClientState) -> Self {
IbcCometClientState::new(
client_state.chain_id,
Expand All @@ -178,15 +178,12 @@ impl From<CometClientState> for Any {
},
)
.expect("no error")
.into()
}
}

impl From<CometClientState> for IbcCometClientState {
fn from(value: CometClientState) -> Self {
Any::from(value)
.try_into()
.expect("valid tendermint client state")
impl From<CometClientState> for Any {
fn from(client_state: CometClientState) -> Self {
IbcCometClientState::from(client_state).into()
}
}

Expand Down

0 comments on commit e3f7fc0

Please sign in to comment.