mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 08:41:07 +00:00
Update parity-scale-codec to 2.0 (#7994)
* update cargo.toml * use 2.0 in mmmr
This commit is contained in:
committed by
GitHub
parent
bea4a6524d
commit
f48296e9ad
@@ -49,7 +49,7 @@ impl StdError for Error {
|
||||
impl fmt::Display for Error {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
Error::Decode(e) => write!(f, "Decode error: {}", e.what()),
|
||||
Error::Decode(e) => write!(f, "Decode error: {}", e),
|
||||
Error::BadFormat => write!(f, "Bad format"),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ pub(crate) enum NodeKind {
|
||||
}
|
||||
|
||||
impl Encode for NodeHeader {
|
||||
fn encode_to<T: Output>(&self, output: &mut T) {
|
||||
fn encode_to<T: Output + ?Sized>(&self, output: &mut T) {
|
||||
match self {
|
||||
NodeHeader::Null => output.push_byte(trie_constants::EMPTY_TRIE),
|
||||
NodeHeader::Branch(true, nibble_count) =>
|
||||
@@ -99,7 +99,7 @@ pub(crate) fn size_and_prefix_iterator(size: usize, prefix: u8) -> impl Iterator
|
||||
}
|
||||
|
||||
/// Encodes size and prefix to a stream output.
|
||||
fn encode_size_and_prefix(size: usize, prefix: u8, out: &mut impl Output) {
|
||||
fn encode_size_and_prefix<W: Output + ?Sized>(size: usize, prefix: u8, out: &mut W) {
|
||||
for b in size_and_prefix_iterator(size, prefix) {
|
||||
out.push_byte(b)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user