From ccd24701150cb9a9fe088abef46ded81b2a201b3 Mon Sep 17 00:00:00 2001 From: Thibault Martinez Date: Fri, 29 Sep 2023 14:46:12 +0200 Subject: [PATCH] Clippy: remove unnecessary map_err (#1353) --- sdk/src/types/block/output/mod.rs | 2 +- sdk/src/types/block/output/unlock_condition/mod.rs | 2 +- sdk/src/types/block/payload/mod.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/src/types/block/output/mod.rs b/sdk/src/types/block/output/mod.rs index 91fc831614..9ef437c8de 100644 --- a/sdk/src/types/block/output/mod.rs +++ b/sdk/src/types/block/output/mod.rs @@ -456,7 +456,7 @@ impl Packable for Output { AliasOutput::KIND => Self::from(AliasOutput::unpack::<_, VERIFY>(unpacker, visitor).coerce()?), FoundryOutput::KIND => Self::from(FoundryOutput::unpack::<_, VERIFY>(unpacker, visitor).coerce()?), NftOutput::KIND => Self::from(NftOutput::unpack::<_, VERIFY>(unpacker, visitor).coerce()?), - k => return Err(Error::InvalidOutputKind(k)).map_err(UnpackError::Packable), + k => return Err(UnpackError::Packable(Error::InvalidOutputKind(k))), }) } } diff --git a/sdk/src/types/block/output/unlock_condition/mod.rs b/sdk/src/types/block/output/unlock_condition/mod.rs index 9d8ae2a92d..b65e70bb67 100644 --- a/sdk/src/types/block/output/unlock_condition/mod.rs +++ b/sdk/src/types/block/output/unlock_condition/mod.rs @@ -288,7 +288,7 @@ impl Packable for UnlockCondition { ImmutableAliasAddressUnlockCondition::KIND => { Self::from(ImmutableAliasAddressUnlockCondition::unpack::<_, VERIFY>(unpacker, &()).coerce()?) } - k => return Err(Error::InvalidOutputKind(k)).map_err(UnpackError::Packable), + k => return Err(UnpackError::Packable(Error::InvalidOutputKind(k))), }) } } diff --git a/sdk/src/types/block/payload/mod.rs b/sdk/src/types/block/payload/mod.rs index eae6027ba2..3a908c2b1d 100644 --- a/sdk/src/types/block/payload/mod.rs +++ b/sdk/src/types/block/payload/mod.rs @@ -132,7 +132,7 @@ impl Packable for Payload { Self::from(TreasuryTransactionPayload::unpack::<_, VERIFY>(unpacker, visitor).coerce()?) } TaggedDataPayload::KIND => Self::from(TaggedDataPayload::unpack::<_, VERIFY>(unpacker, &()).coerce()?), - k => return Err(Error::InvalidPayloadKind(k)).map_err(UnpackError::Packable), + k => return Err(UnpackError::Packable(Error::InvalidPayloadKind(k))), }) } }