From 5d987694c56a20025deed4b8d1d6ee3cd1d5c979 Mon Sep 17 00:00:00 2001 From: Davirain Date: Tue, 31 Jan 2023 22:41:00 +0800 Subject: [PATCH] Typo fix (#59) * update TypeInfo impl for Any * Specify the path of any * Remove borsh::maybestd::io::Read use import * fmt code --- src/google.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/google.rs b/src/google.rs index 6034230a..5b33c728 100644 --- a/src/google.rs +++ b/src/google.rs @@ -235,7 +235,6 @@ pub mod protobuf { use alloc::string::String; use alloc::vec::Vec; - use borsh::maybestd::io::Read; #[cfg_attr( feature = "parity-scale-codec", @@ -271,7 +270,9 @@ pub mod protobuf { #[cfg(feature = "borsh")] impl borsh::BorshDeserialize for Any { - fn deserialize_reader(reader: &mut R) -> borsh::maybestd::io::Result { + fn deserialize_reader( + reader: &mut R, + ) -> borsh::maybestd::io::Result { let inner_any = InnerAny::deserialize_reader(reader)?; Ok(Any { @@ -310,7 +311,7 @@ pub mod protobuf { fn type_info() -> scale_info::Type { scale_info::Type::builder() - .path(scale_info::Path::new("HeaderAttribute", module_path!())) + .path(scale_info::Path::new("Any", "ibc_proto::google::protobuf")) // i128 is chosen before we represent the timestamp is nanoseconds, which is represented as a i128 by Time .composite( scale_info::build::Fields::named()