Skip to content

Commit 492114b

Browse files
committed
fix(no_std): replace std::string with alloc::string for compatibility
1 parent d53a80e commit 492114b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

crates/chain/src/indexer/keychain_txout.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::{
1010
spk_txout::SpkTxOutIndex,
1111
DescriptorExt, DescriptorId, Indexed, Indexer, KeychainIndexed, SpkIterator,
1212
};
13-
use alloc::{borrow::ToOwned, vec::Vec, string::ToString, string::String};
13+
use alloc::{borrow::ToOwned, string::String, string::ToString, vec::Vec};
1414
use bitcoin::{
1515
key::Secp256k1, Amount, OutPoint, Script, ScriptBuf, SignedAmount, Transaction, TxOut, Txid,
1616
};
@@ -975,10 +975,7 @@ pub enum InsertDescriptorError<K> {
975975

976976
/// Returns a shortened string representation of a descriptor.
977977
/// Shows the first and last `edge_len` characters, separated by `...`.
978-
fn short_descriptor(
979-
desc: &Descriptor<DescriptorPublicKey>,
980-
edge_len: usize,
981-
) -> String {
978+
fn short_descriptor(desc: &Descriptor<DescriptorPublicKey>, edge_len: usize) -> String {
982979
let s = ToString::to_string(desc);
983980
if s.len() <= edge_len * 2 {
984981
return s;

0 commit comments

Comments
 (0)