From 08c036023babd3df39243a2553f1d0232d0374d0 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Tue, 7 Nov 2023 10:49:09 -0800 Subject: [PATCH] Shift str impl from the std to alloc feature --- Cargo.toml | 4 ++-- src/curr/str.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index bb741bf0..714b6c6a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,8 +34,8 @@ serde_json = "1.0.89" [features] default = ["std", "curr"] -std = ["alloc", "dep:stellar-strkey"] -alloc = ["dep:hex"] +std = ["alloc"] +alloc = ["dep:hex", "dep:stellar-strkey"] curr = [] next = [] diff --git a/src/curr/str.rs b/src/curr/str.rs index 5333323e..c5ad3e8b 100644 --- a/src/curr/str.rs +++ b/src/curr/str.rs @@ -13,7 +13,7 @@ //# - SignerKey //# - SignerKeyEd25519SignedPayload //# - NodeId -#![cfg(feature = "std")] +#![cfg(feature = "alloc")] use super::{ AccountId, Error, Hash, MuxedAccount, MuxedAccountMed25519, NodeId, PublicKey, ScAddress, @@ -31,7 +31,7 @@ impl core::fmt::Display for PublicKey { match self { PublicKey::PublicKeyTypeEd25519(Uint256(k)) => { let k = stellar_strkey::ed25519::PublicKey::from_payload(k) - .map_err(|_| std::fmt::Error)?; + .map_err(|_| core::fmt::Error)?; let s = k.to_string(); f.write_str(&s)?; }