Skip to content

Commit

Permalink
Downupgrade borsh version (#104)
Browse files Browse the repository at this point in the history
Update google.rs
  • Loading branch information
DaviRain-Su authored Jun 2, 2023
1 parent c247685 commit b398600
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ parity-scale-codec = { version = "3.0.0", default-features = false, features = [
scale-info = { version = "2.1.2", default-features = false, features = ["derive"], optional = true }

## for borsh encode or decode
borsh = { version = "0.10.0", default-features = false, optional = true }
## need tracking anchor-lang and near-sdk-rs borsh version
borsh = { version = "0.9", default-features = false, optional = true }

[dependencies.ics23]
version = "0.10.1"
Expand Down
6 changes: 2 additions & 4 deletions src/google.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,8 @@ pub mod protobuf {

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

Ok(Any {
type_url: inner_any.type_url,
Expand Down

0 comments on commit b398600

Please sign in to comment.