From 3ed6023a90d6b4c503541dc908588e60c5948c72 Mon Sep 17 00:00:00 2001 From: Dhruv D Jain Date: Tue, 19 Dec 2023 01:23:20 +0530 Subject: [PATCH] fix: recursive call in connection `State` conversion to `i32` (#1010) * fix state conversion recursive call * replace match with casting Co-authored-by: Michal Nazarewicz Signed-off-by: Dhruv D Jain * chore: add unclog * nit --------- Signed-off-by: Dhruv D Jain Co-authored-by: Michal Nazarewicz Co-authored-by: Farhad Shabani --- .../1010-fix-recursive-call-in-conn-state-converstion-to-i32.md | 2 ++ ibc-core/ics03-connection/types/src/connection.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .changelog/unreleased/bug-fixes/1010-fix-recursive-call-in-conn-state-converstion-to-i32.md diff --git a/.changelog/unreleased/bug-fixes/1010-fix-recursive-call-in-conn-state-converstion-to-i32.md b/.changelog/unreleased/bug-fixes/1010-fix-recursive-call-in-conn-state-converstion-to-i32.md new file mode 100644 index 000000000..337ba7642 --- /dev/null +++ b/.changelog/unreleased/bug-fixes/1010-fix-recursive-call-in-conn-state-converstion-to-i32.md @@ -0,0 +1,2 @@ +- `[ibc-core-connection-types]` Fix recursive call in connection `State` + conversion to `i32` ([#1010](https://github.com/cosmos/ibc-rs/issues/1010)) diff --git a/ibc-core/ics03-connection/types/src/connection.rs b/ibc-core/ics03-connection/types/src/connection.rs index 2af44ec5f..d73d53930 100644 --- a/ibc-core/ics03-connection/types/src/connection.rs +++ b/ibc-core/ics03-connection/types/src/connection.rs @@ -559,6 +559,6 @@ impl TryFrom for State { impl From for i32 { fn from(value: State) -> Self { - value.into() + value as i32 } }