Skip to content

Commit 2a0640e

Browse files
fix: remove Identifier variant from few more enums
1 parent da620b8 commit 2a0640e

File tree

2 files changed

+7
-6
lines changed
  • ibc-apps/ics721-nft-transfer/types/src
  • ibc-core/ics02-client/types/src

2 files changed

+7
-6
lines changed

ibc-apps/ics721-nft-transfer/types/src/error.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ pub enum NftTransferError {
1616
ContextError(ContextError),
1717
/// decoding error: `{0}`
1818
Decoding(DecodingError),
19-
/// identifier error: `{0}`
20-
Identifier(IdentifierError),
2119
/// invalid trace: `{0}`
2220
InvalidTrace(String),
2321
/// invalid URI error: `{0}`
@@ -58,6 +56,12 @@ impl std::error::Error for NftTransferError {
5856
}
5957
}
6058

59+
impl From<IdentifierError> for NftTransferError {
60+
fn from(e: IdentifierError) -> Self {
61+
Self::Decoding(DecodingError::Identifier(e))
62+
}
63+
}
64+
6165
impl From<Infallible> for NftTransferError {
6266
fn from(e: Infallible) -> Self {
6367
match e {}

ibc-core/ics02-client/types/src/error.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ pub enum ClientError {
2020
Upgrade(UpgradeClientError),
2121
/// decoding error: `{0}`
2222
Decoding(DecodingError),
23-
/// identifier error: `{0}`
24-
Identifier(IdentifierError),
2523
/// invalid trust threshold: `{numerator}`/`{denominator}`
2624
InvalidTrustThreshold { numerator: u64, denominator: u64 },
2725
/// invalid client state type: `{0}`
@@ -110,7 +108,7 @@ impl From<DecodingError> for ClientError {
110108

111109
impl From<IdentifierError> for ClientError {
112110
fn from(e: IdentifierError) -> Self {
113-
Self::Identifier(e)
111+
Self::Decoding(DecodingError::Identifier(e))
114112
}
115113
}
116114

@@ -119,7 +117,6 @@ impl std::error::Error for ClientError {
119117
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
120118
match &self {
121119
Self::FailedICS23Verification(e) => Some(e),
122-
Self::Identifier(e) => Some(e),
123120
Self::Decoding(e) => Some(e),
124121
_ => None,
125122
}

0 commit comments

Comments
 (0)