Update parity-scale-codec to 2.0 (#7994)

* update cargo.toml

* use 2.0 in mmmr
This commit is contained in:
Guillaume Thiolliere
2021-01-29 13:22:45 +01:00
committed by GitHub
parent bea4a6524d
commit f48296e9ad
179 changed files with 316 additions and 383 deletions
@@ -12,7 +12,7 @@ description = "FRAME Merkle Mountain Range primitives."
targets = ["x86_64-unknown-linux-gnu"]
[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 }
frame-support = { version = "2.0.0", default-features = false, path = "../../support" }
frame-system = { version = "2.0.0", default-features = false, path = "../../system" }
serde = { version = "1.0.101", optional = true, features = ["derive"] }
@@ -127,7 +127,7 @@ mod encoding {
}
impl<H: traits::Hash, L: FullLeaf> codec::Encode for DataOrHash<H, L> {
fn encode_to<T: codec::Output>(&self, dest: &mut T) {
fn encode_to<T: codec::Output + ?Sized>(&self, dest: &mut T) {
match self {
Self::Data(l) => l.using_encoded(
|data| Either::<&[u8], &H::Output>::Left(data).encode_to(dest), false