Skip to content

Commit

Permalink
fix: Fix FromStr not found error on AccountId20 (#1496)
Browse files Browse the repository at this point in the history
* fix: Fix FromStr not found error on AccountId20

* Update primitives/account/src/lib.rs

Co-authored-by: Bear Wang <boundless.forest@outlook.com>

* fix: Fix build error

---------

Co-authored-by: Bear Wang <boundless.forest@outlook.com>
  • Loading branch information
conr2d and boundless-forest authored Aug 24, 2024
1 parent 6bf3f63 commit 80c768f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion primitives/account/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ pub struct AccountId20(pub [u8; 20]);
#[cfg(feature = "serde")]
impl_serde::impl_fixed_hash_serde!(AccountId20, 20);

impl core::str::FromStr for AccountId20 {
#[cfg(feature = "std")]
impl std::str::FromStr for AccountId20 {
type Err = &'static str;

fn from_str(s: &str) -> Result<Self, Self::Err> {
Expand Down

0 comments on commit 80c768f

Please sign in to comment.