From 0ca3fafc8ae470c747d2579d94d040fccd52acfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Zwoli=C5=84ski?= Date: Tue, 9 Jan 2024 13:50:55 +0100 Subject: [PATCH] fix: clippy issues in celestia-tendermint --- tendermint/src/chain/id.rs | 2 +- tendermint/src/crypto/ed25519/signing_key.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tendermint/src/chain/id.rs b/tendermint/src/chain/id.rs index 2b0aa13a1..b78496865 100644 --- a/tendermint/src/chain/id.rs +++ b/tendermint/src/chain/id.rs @@ -58,7 +58,7 @@ impl Id { /// Get the chain ID as a raw bytes. pub fn as_bytes(&self) -> &[u8] { - self.0.as_str().as_bytes() + self.0.as_bytes() } } diff --git a/tendermint/src/crypto/ed25519/signing_key.rs b/tendermint/src/crypto/ed25519/signing_key.rs index 6abcc9492..034557859 100644 --- a/tendermint/src/crypto/ed25519/signing_key.rs +++ b/tendermint/src/crypto/ed25519/signing_key.rs @@ -38,7 +38,6 @@ impl TryFrom for ed25519_consensus::SigningKey { type Error = Error; fn try_from(src: SigningKey) -> Result { - ed25519_consensus::SigningKey::try_from(src.0) - .map_err(|_| Error::invalid_key("malformed Ed25519 private key".into())) + Ok(ed25519_consensus::SigningKey::from(src.0)) } }