From 6fd66275ca9edf848947a5a12263639ef0be1f07 Mon Sep 17 00:00:00 2001 From: Jeeyong Um Date: Sat, 24 Aug 2024 09:07:50 +0900 Subject: [PATCH] fix: Fix FromStr not found error on AccountId20 (#1496) * fix: Fix FromStr not found error on AccountId20 * Update primitives/account/src/lib.rs Co-authored-by: Bear Wang * fix: Fix build error --------- Co-authored-by: Bear Wang --- primitives/account/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/primitives/account/src/lib.rs b/primitives/account/src/lib.rs index b1f1588dcb..d2263aa25d 100644 --- a/primitives/account/src/lib.rs +++ b/primitives/account/src/lib.rs @@ -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 {