mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-24 17:05:47 +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
@@ -18,16 +18,16 @@ name = "bench"
|
||||
harness = false
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
|
||||
sp-std = { version = "2.0.0", default-features = false, path = "../std" }
|
||||
hash-db = { version = "0.15.2", default-features = false }
|
||||
trie-db = { version = "0.22.2", default-features = false }
|
||||
trie-root = { version = "0.16.0", default-features = false }
|
||||
memory-db = { version = "0.25.0", default-features = false }
|
||||
memory-db = { version = "0.26.0", default-features = false }
|
||||
sp-core = { version = "2.0.0", default-features = false, path = "../core" }
|
||||
|
||||
[dev-dependencies]
|
||||
trie-bench = "0.26.0"
|
||||
trie-bench = "0.27.0"
|
||||
trie-standardmap = "0.15.2"
|
||||
criterion = "0.3.3"
|
||||
hex-literal = "0.3.1"
|
||||
|
||||
@@ -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