Skip to content

Commit fdae562

Browse files
committed
Relax DistributionQuerier::new param type
1 parent edada3e commit fdae562

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/std/src/testing/mock.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use alloc::collections::BTreeMap;
22
use bech32::{encode, ToBase32, Variant};
3+
use core::iter::IntoIterator;
34
use core::marker::PhantomData;
45
#[cfg(feature = "cosmwasm_1_3")]
56
use core::ops::Bound;
@@ -998,9 +999,12 @@ pub struct DistributionQuerier {
998999

9991000
#[cfg(feature = "cosmwasm_1_3")]
10001001
impl DistributionQuerier {
1001-
pub fn new(withdraw_addresses: HashMap<String, String>) -> Self {
1002+
pub fn new<T>(withdraw_addresses: T) -> Self
1003+
where
1004+
T: IntoIterator<Item = (String, String)>,
1005+
{
10021006
DistributionQuerier {
1003-
withdraw_addresses,
1007+
withdraw_addresses: withdraw_addresses.into_iter().collect(),
10041008
..Default::default()
10051009
}
10061010
}

0 commit comments

Comments
 (0)