@@ -68,15 +68,16 @@ fn test_update_config() {
6868    let  mut  deps = mock_dependencies ( & [ ] ) ; 
6969    let  api = deps. api ; 
7070
71-     deps. querier . add_wasm_query_response ( api. addr_make ( "token_contract" ) . as_str ( ) ,  |_| { 
72-         cosmwasm_std:: ContractResult :: Ok ( 
73-             to_json_binary ( & drop_staking_base:: msg:: token:: ConfigResponse  { 
74-                 factory_contract :  api. addr_make ( "factory_contract" ) . to_string ( ) , 
75-                 denom :  "ld_denom" . to_string ( ) , 
76-             } ) 
77-             . unwrap ( ) , 
78-         ) 
79-     } ) ; 
71+     deps. querier 
72+         . add_wasm_query_response ( api. addr_make ( "token_contract" ) . as_str ( ) ,  move  |_| { 
73+             cosmwasm_std:: ContractResult :: Ok ( 
74+                 to_json_binary ( & drop_staking_base:: msg:: token:: ConfigResponse  { 
75+                     factory_contract :  api. addr_make ( "factory_contract" ) . to_string ( ) , 
76+                     denom :  "ld_denom" . to_string ( ) , 
77+                 } ) 
78+                 . unwrap ( ) , 
79+             ) 
80+         } ) ; 
8081    deps. querier 
8182        . add_wasm_query_response ( "old_token_contract" ,  |_| { 
8283            cosmwasm_std:: ContractResult :: Ok ( 
@@ -331,9 +332,10 @@ fn test_add_remove_bond_provider() {
331332        to_json_binary:: <Vec <( Addr ,  bool ) >>( & vec![ ] ) . unwrap( ) 
332333    ) ; 
333334
334-     deps. querier . add_wasm_query_response ( bond_provider_address. as_str ( ) ,  |_| { 
335-         cosmwasm_std:: ContractResult :: Ok ( to_json_binary ( & true ) . unwrap ( ) ) 
336-     } ) ; 
335+     deps. querier 
336+         . add_wasm_query_response ( bond_provider_address. as_str ( ) ,  |_| { 
337+             cosmwasm_std:: ContractResult :: Ok ( to_json_binary ( & true ) . unwrap ( ) ) 
338+         } ) ; 
337339
338340    let  res = execute ( 
339341        deps. as_mut ( ) , 
@@ -950,7 +952,11 @@ fn test_tick_claiming_error_wo_transfer() {
950952            let  q:  StrategyQueryMsg  = from_json ( msg) . unwrap ( ) ; 
951953            match  q { 
952954                StrategyQueryMsg :: CalcDeposit  {  deposit }  => cosmwasm_std:: ContractResult :: Ok ( 
953-                     to_json_binary ( & vec ! [ ( api. addr_make( "valoper_address" ) . to_string( ) ,  deposit) ] ) . unwrap ( ) , 
955+                     to_json_binary ( & vec ! [ ( 
956+                         api. addr_make( "valoper_address" ) . to_string( ) , 
957+                         deposit, 
958+                     ) ] ) 
959+                     . unwrap ( ) , 
954960                ) , 
955961                _ => unimplemented ! ( ) , 
956962            } 
@@ -1070,7 +1076,11 @@ fn test_tick_claiming_error_with_transfer() {
10701076            let  q:  StrategyQueryMsg  = from_json ( msg) . unwrap ( ) ; 
10711077            match  q { 
10721078                StrategyQueryMsg :: CalcDeposit  {  deposit }  => cosmwasm_std:: ContractResult :: Ok ( 
1073-                     to_json_binary ( & vec ! [ ( api. addr_make( "valoper_address" ) . to_string( ) ,  deposit) ] ) . unwrap ( ) , 
1079+                     to_json_binary ( & vec ! [ ( 
1080+                         api. addr_make( "valoper_address" ) . to_string( ) , 
1081+                         deposit, 
1082+                     ) ] ) 
1083+                     . unwrap ( ) , 
10741084                ) , 
10751085                _ => unimplemented ! ( ) , 
10761086            } 
@@ -1241,7 +1251,11 @@ fn test_tick_claiming_wo_transfer_unbonding() {
12411251            let  q:  StrategyQueryMsg  = from_json ( msg) . unwrap ( ) ; 
12421252            match  q { 
12431253                StrategyQueryMsg :: CalcWithdraw  {  withdraw }  => cosmwasm_std:: ContractResult :: Ok ( 
1244-                     to_json_binary ( & vec ! [ ( api. addr_make( "valoper_address" ) . to_string( ) ,  withdraw) ] ) . unwrap ( ) , 
1254+                     to_json_binary ( & vec ! [ ( 
1255+                         api. addr_make( "valoper_address" ) . to_string( ) , 
1256+                         withdraw, 
1257+                     ) ] ) 
1258+                     . unwrap ( ) , 
12451259                ) , 
12461260                _ => unimplemented ! ( ) , 
12471261            } 
@@ -1426,7 +1440,11 @@ fn test_tick_claiming_wo_idle() {
14261440            let  q:  StrategyQueryMsg  = from_json ( msg) . unwrap ( ) ; 
14271441            match  q { 
14281442                StrategyQueryMsg :: CalcWithdraw  {  withdraw }  => cosmwasm_std:: ContractResult :: Ok ( 
1429-                     to_json_binary ( & vec ! [ ( api. addr_make( "valoper_address" ) . to_string( ) ,  withdraw) ] ) . unwrap ( ) , 
1443+                     to_json_binary ( & vec ! [ ( 
1444+                         api. addr_make( "valoper_address" ) . to_string( ) , 
1445+                         withdraw, 
1446+                     ) ] ) 
1447+                     . unwrap ( ) , 
14301448                ) , 
14311449                _ => unimplemented ! ( ) , 
14321450            } 
@@ -1965,7 +1983,7 @@ fn test_bond_lsm_share_increase_exchange_rate() {
19651983    BOND_PROVIDERS . init ( deps. as_mut ( ) . storage ) . unwrap ( ) ; 
19661984
19671985    deps. querier 
1968-         . add_wasm_query_response ( api. addr_make ( "puppeteer_contract" ) . as_str ( ) ,  |_| { 
1986+         . add_wasm_query_response ( api. addr_make ( "puppeteer_contract" ) . as_str ( ) ,  move   |_| { 
19691987            cosmwasm_std:: ContractResult :: Ok ( 
19701988                to_json_binary ( & DelegationsResponse  { 
19711989                    delegations :  Delegations  { 
@@ -1984,7 +2002,7 @@ fn test_bond_lsm_share_increase_exchange_rate() {
19842002            ) 
19852003        } ) ; 
19862004    deps. querier 
1987-         . add_wasm_query_response ( api. addr_make ( "puppeteer_contract" ) . as_str ( ) ,  |_| { 
2005+         . add_wasm_query_response ( api. addr_make ( "puppeteer_contract" ) . as_str ( ) ,  move   |_| { 
19882006            cosmwasm_std:: ContractResult :: Ok ( 
19892007                to_json_binary ( & DelegationsResponse  { 
19902008                    delegations :  Delegations  { 
@@ -2090,11 +2108,14 @@ fn test_unbond() {
20902108    let  mut  env = mock_env ( ) ; 
20912109
20922110    deps. querier 
2093-         . add_wasm_query_response ( "factory_contract" ,  |_| { 
2111+         . add_wasm_query_response ( "factory_contract" ,  move   |_| { 
20942112            cosmwasm_std:: ContractResult :: Ok ( 
20952113                to_json_binary ( & HashMap :: from ( [ 
20962114                    ( "token_contract" ,  api. addr_make ( "token_contract" ) . as_str ( ) ) , 
2097-                     ( "withdrawal_voucher_contract" ,  api. addr_make ( "withdrawal_voucher_contract" ) . as_str ( ) ) , 
2115+                     ( 
2116+                         "withdrawal_voucher_contract" , 
2117+                         api. addr_make ( "withdrawal_voucher_contract" ) . as_str ( ) , 
2118+                     ) , 
20982119                ] ) ) 
20992120                . unwrap ( ) , 
21002121            ) 
0 commit comments