style: Migrate to stable-only rustfmt configuration
- Remove nightly-only features from .rustfmt.toml and vendor/ss58-registry/rustfmt.toml - Removed features: imports_granularity, wrap_comments, comment_width, reorder_impl_items, spaces_around_ranges, binop_separator, match_arm_blocks, trailing_semicolon, trailing_comma - Format all 898 affected files with stable rustfmt - Ensures long-term reliability without nightly toolchain dependency
This commit is contained in:
@@ -231,12 +231,15 @@ where
|
||||
) -> Vec<u8> {
|
||||
let contains_hash = matches!(&value, Some(Value::Node(..)));
|
||||
let mut output = match (&value, contains_hash) {
|
||||
(&None, _) =>
|
||||
partial_from_iterator_encode(partial, number_nibble, NodeKind::BranchNoValue),
|
||||
(_, false) =>
|
||||
partial_from_iterator_encode(partial, number_nibble, NodeKind::BranchWithValue),
|
||||
(_, true) =>
|
||||
partial_from_iterator_encode(partial, number_nibble, NodeKind::HashedValueBranch),
|
||||
(&None, _) => {
|
||||
partial_from_iterator_encode(partial, number_nibble, NodeKind::BranchNoValue)
|
||||
},
|
||||
(_, false) => {
|
||||
partial_from_iterator_encode(partial, number_nibble, NodeKind::BranchWithValue)
|
||||
},
|
||||
(_, true) => {
|
||||
partial_from_iterator_encode(partial, number_nibble, NodeKind::HashedValueBranch)
|
||||
},
|
||||
};
|
||||
|
||||
let bitmap_index = output.len();
|
||||
@@ -287,10 +290,12 @@ fn partial_from_iterator_encode<I: Iterator<Item = u8>>(
|
||||
NodeKind::Leaf => NodeHeader::Leaf(nibble_count).encode_to(&mut output),
|
||||
NodeKind::BranchWithValue => NodeHeader::Branch(true, nibble_count).encode_to(&mut output),
|
||||
NodeKind::BranchNoValue => NodeHeader::Branch(false, nibble_count).encode_to(&mut output),
|
||||
NodeKind::HashedValueLeaf =>
|
||||
NodeHeader::HashedValueLeaf(nibble_count).encode_to(&mut output),
|
||||
NodeKind::HashedValueBranch =>
|
||||
NodeHeader::HashedValueBranch(nibble_count).encode_to(&mut output),
|
||||
NodeKind::HashedValueLeaf => {
|
||||
NodeHeader::HashedValueLeaf(nibble_count).encode_to(&mut output)
|
||||
},
|
||||
NodeKind::HashedValueBranch => {
|
||||
NodeHeader::HashedValueBranch(nibble_count).encode_to(&mut output)
|
||||
},
|
||||
};
|
||||
output.extend(partial);
|
||||
output
|
||||
|
||||
Reference in New Issue
Block a user