Skip to content

Commit

Permalink
Typo fix (#59)
Browse files Browse the repository at this point in the history
* update TypeInfo impl for Any

* Specify the path of any

* Remove borsh::maybestd::io::Read use import

* fmt code
  • Loading branch information
DaviRain-Su authored Jan 31, 2023
1 parent 10a0acb commit 5d98769
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/google.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -271,7 +270,9 @@ pub mod protobuf {

#[cfg(feature = "borsh")]
impl borsh::BorshDeserialize for Any {
fn deserialize_reader<R: Read>(reader: &mut R) -> borsh::maybestd::io::Result<Self> {
fn deserialize_reader<R: borsh::maybestd::io::Read>(
reader: &mut R,
) -> borsh::maybestd::io::Result<Self> {
let inner_any = InnerAny::deserialize_reader(reader)?;

Ok(Any {
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 5d98769

Please sign in to comment.