Skip to content

Commit 8dd8a42

Browse files
committed
fix(no_std): replace std::string with alloc::string for compatibility
1 parent 69bbe1e commit 8dd8a42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/chain/src/indexer/keychain_txout.rs

Lines changed: 2 additions & 2 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};
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
};
@@ -980,7 +980,7 @@ fn short_descriptor(
980980
edge_len: usize,
981981
) -> std::string::String {
982982
let s = std::string::ToString::to_string(desc);
983-
983+
984984
// +3 accounts for "..." so the shortened string won't exceed original length.
985985
if s.len() <= edge_len * 2 + 3 {
986986
return s;

0 commit comments

Comments
 (0)