diff --git a/clarity/src/vm/representations.rs b/clarity/src/vm/representations.rs index 0f779b479f..7e5423b850 100644 --- a/clarity/src/vm/representations.rs +++ b/clarity/src/vm/representations.rs @@ -84,6 +84,7 @@ guarded_string!( ); impl StacksMessageCodec for ClarityName { + #[allow(clippy::needless_as_bytes)] // as_bytes isn't necessary, but verbosity is preferable in the codec impls fn consensus_serialize(&self, fd: &mut W) -> Result<(), codec_error> { // ClarityName can't be longer than vm::representations::MAX_STRING_LEN, which itself is // a u8, so we should be good here. @@ -124,6 +125,7 @@ impl StacksMessageCodec for ClarityName { } impl StacksMessageCodec for ContractName { + #[allow(clippy::needless_as_bytes)] // as_bytes isn't necessary, but verbosity is preferable in the codec impls fn consensus_serialize(&self, fd: &mut W) -> Result<(), codec_error> { if self.as_bytes().len() < CONTRACT_MIN_NAME_LENGTH || self.as_bytes().len() > CONTRACT_MAX_NAME_LENGTH diff --git a/libsigner/src/v0/messages.rs b/libsigner/src/v0/messages.rs index 5f716cea2f..0ef3b904d2 100644 --- a/libsigner/src/v0/messages.rs +++ b/libsigner/src/v0/messages.rs @@ -283,6 +283,7 @@ pub struct PeerInfo { } impl StacksMessageCodec for PeerInfo { + #[allow(clippy::needless_as_bytes)] // as_bytes isn't necessary, but verbosity is preferable in the codec impls fn consensus_serialize(&self, fd: &mut W) -> Result<(), CodecError> { write_next(fd, &self.burn_block_height)?; write_next(fd, self.stacks_tip_consensus_hash.as_bytes())?; diff --git a/pox-locking/src/events.rs b/pox-locking/src/events.rs index 2e80ff8761..e65018f27c 100644 --- a/pox-locking/src/events.rs +++ b/pox-locking/src/events.rs @@ -20,10 +20,10 @@ use clarity::vm::costs::LimitedCostTracker; use clarity::vm::errors::Error as ClarityError; use clarity::vm::types::{PrincipalData, QualifiedContractIdentifier, ResponseData, TupleData}; use clarity::vm::Value; -#[cfg(test)] +#[cfg(any(test, feature = "testing"))] use slog::slog_debug; use slog::slog_error; -#[cfg(test)] +#[cfg(any(test, feature = "testing"))] use stacks_common::debug; use stacks_common::types::StacksEpochId; use stacks_common::{error, test_debug}; diff --git a/pox-locking/src/events_24.rs b/pox-locking/src/events_24.rs index 49ca9c38cd..3f54794bb7 100644 --- a/pox-locking/src/events_24.rs +++ b/pox-locking/src/events_24.rs @@ -19,10 +19,10 @@ use clarity::vm::contexts::GlobalContext; use clarity::vm::errors::Error as ClarityError; use clarity::vm::types::{PrincipalData, QualifiedContractIdentifier, TupleData}; use clarity::vm::Value; -#[cfg(test)] +#[cfg(any(test, feature = "testing"))] use slog::slog_debug; use slog::slog_error; -#[cfg(test)] +#[cfg(any(test, feature = "testing"))] use stacks_common::debug; use stacks_common::{error, test_debug};