Use encoding:: prefix on encoding trait
What changed, and why it matters
This is a trivial code-style change. A developer replaced a direct import of the Encodable trait with its full path (encoding::Encodable) to make it clearer that the trait comes from another crate. No behavior, logic, or security properties changed.
No action needed. This is a non-security refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit removes use encoding::Encodable; and changes impl Encodable for BlockHash to impl encoding::Encodable for BlockHash in primitives/src/hash_types/block_hash.rs. This is purely a syntactic/path-visibility refactor with no functional or security impact.
Changed components
primitives/src/hash_types/block_hash.rsInspect captured patch +1 / −2
diff --git a/primitives/src/hash_types/block_hash.rs b/primitives/src/hash_types/block_hash.rs
index b23fff5b..b305966e 100644
--- a/primitives/src/hash_types/block_hash.rs
+++ b/primitives/src/hash_types/block_hash.rs
@@ -9,7 +9,6 @@ use core::str;
#[cfg(feature = "arbitrary")]
use arbitrary::{Arbitrary, Unstructured};
-use encoding::Encodable;
use hashes::sha256d;
use internals::write_err;
@@ -36,7 +35,7 @@ encoding::encoder_newtype_exact! {
pub struct BlockHashEncoder<'e>(encoding::ArrayRefEncoder<'e, 32>);
}
-impl Encodable for BlockHash {
+impl encoding::Encodable for BlockHash {
type Encoder<'e> = BlockHashEncoder<'e>;
fn encoder(&self) -> Self::Encoder<'_> {
BlockHashEncoder::new(encoding::ArrayRefEncoder::without_length_prefix(self.as_byte_array()))
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.