From f7c39513c5e1dc2f3a1cb835756019984c124b94 Mon Sep 17 00:00:00 2001 From: Jakub Zajkowski Date: Tue, 8 Oct 2024 11:32:53 +0200 Subject: [PATCH] Fixed broken import --- .../transaction/transaction_v1/transaction_v1_builder.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/types/src/transaction/transaction_v1/transaction_v1_builder.rs b/types/src/transaction/transaction_v1/transaction_v1_builder.rs index 6e91df9fc2..bac581c741 100644 --- a/types/src/transaction/transaction_v1/transaction_v1_builder.rs +++ b/types/src/transaction/transaction_v1/transaction_v1_builder.rs @@ -15,11 +15,11 @@ use crate::{ }; #[cfg(any(feature = "testing", test))] use crate::{testing::TestRng, transaction::Approval, TransactionConfig, TransactionV1Hash}; +#[cfg(any(all(feature = "std", feature = "testing"), test))] +use alloc::collections::BTreeMap; pub use error::TransactionV1BuilderError; #[cfg(any(all(feature = "std", feature = "testing"), test))] use rand::Rng; -#[cfg(any(all(feature = "std", feature = "testing"), test))] -use std::collections::BTreeMap; /// A builder for constructing a [`TransactionV1`]. /// @@ -83,6 +83,7 @@ impl<'a> TransactionV1Builder<'a> { _phantom_data: PhantomData, #[cfg(any(all(feature = "std", feature = "testing"), test))] invalid_approvals: vec![], + #[cfg(any(all(feature = "std", feature = "testing"), test))] additional_fields: BTreeMap::new(), } } @@ -288,6 +289,7 @@ impl<'a> TransactionV1Builder<'a> { secret_key: Some(secret_key), _phantom_data: PhantomData, invalid_approvals: vec![], + #[cfg(any(all(feature = "std", feature = "testing"), test))] additional_fields: BTreeMap::new(), } } @@ -332,6 +334,7 @@ impl<'a> TransactionV1Builder<'a> { secret_key: Some(secret_key), _phantom_data: PhantomData, invalid_approvals: vec![], + #[cfg(any(all(feature = "std", feature = "testing"), test))] additional_fields: BTreeMap::new(), } }