mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 16:01:04 +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
@@ -13,7 +13,7 @@ readme = "README.md"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
||||
sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" }
|
||||
sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" }
|
||||
|
||||
@@ -53,7 +53,7 @@ pub enum DecodeDifferent<B, O> where B: 'static, O: 'static {
|
||||
}
|
||||
|
||||
impl<B, O> Encode for DecodeDifferent<B, O> where B: Encode + 'static, O: Encode + 'static {
|
||||
fn encode_to<W: Output>(&self, dest: &mut W) {
|
||||
fn encode_to<W: Output + ?Sized>(&self, dest: &mut W) {
|
||||
match self {
|
||||
DecodeDifferent::Encode(b) => b.encode_to(dest),
|
||||
DecodeDifferent::Decoded(o) => o.encode_to(dest),
|
||||
@@ -139,7 +139,7 @@ pub struct FunctionArgumentMetadata {
|
||||
pub struct FnEncode<E>(pub fn() -> E) where E: Encode + 'static;
|
||||
|
||||
impl<E: Encode> Encode for FnEncode<E> {
|
||||
fn encode_to<W: Output>(&self, dest: &mut W) {
|
||||
fn encode_to<W: Output + ?Sized>(&self, dest: &mut W) {
|
||||
self.0().encode_to(dest);
|
||||
}
|
||||
}
|
||||
@@ -238,7 +238,7 @@ pub struct DefaultByteGetter(pub &'static dyn DefaultByte);
|
||||
pub type ByteGetter = DecodeDifferent<DefaultByteGetter, Vec<u8>>;
|
||||
|
||||
impl Encode for DefaultByteGetter {
|
||||
fn encode_to<W: Output>(&self, dest: &mut W) {
|
||||
fn encode_to<W: Output + ?Sized>(&self, dest: &mut W) {
|
||||
self.0.default_byte().encode_to(dest)
|
||||
}
|
||||
}
|
||||
@@ -374,7 +374,7 @@ pub enum RuntimeMetadata {
|
||||
pub enum RuntimeMetadataDeprecated { }
|
||||
|
||||
impl Encode for RuntimeMetadataDeprecated {
|
||||
fn encode_to<W: Output>(&self, _dest: &mut W) {}
|
||||
fn encode_to<W: Output + ?Sized>(&self, _dest: &mut W) {}
|
||||
}
|
||||
|
||||
impl codec::EncodeLike for RuntimeMetadataDeprecated {}
|
||||
|
||||
Reference in New Issue
Block a user