File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ impl TryFrom<&proto::cosmos::distribution::v1beta1::MsgFundCommunityPool> for Ms
30
30
fn try_from (
31
31
proto : & proto:: cosmos:: distribution:: v1beta1:: MsgFundCommunityPool ,
32
32
) -> Result < MsgFundCommunityPool > {
33
- let mut amounts = vec ! [ ] ;
34
- for amount in proto. amount . iter ( ) {
33
+ let mut amounts = Vec :: with_capacity ( proto . amount . len ( ) ) ;
34
+ for amount in & proto. amount {
35
35
amounts. push ( Coin {
36
36
denom : amount. denom . parse ( ) ?,
37
37
amount : amount. amount . parse ( ) ?,
@@ -56,8 +56,8 @@ impl From<&MsgFundCommunityPool> for proto::cosmos::distribution::v1beta1::MsgFu
56
56
fn from (
57
57
msg : & MsgFundCommunityPool ,
58
58
) -> proto:: cosmos:: distribution:: v1beta1:: MsgFundCommunityPool {
59
- let mut amounts = vec ! [ ] ;
60
- for amount in msg. amount . iter ( ) {
59
+ let mut amounts = Vec :: with_capacity ( msg . amount . len ( ) ) ;
60
+ for amount in & msg. amount {
61
61
amounts. push ( proto:: cosmos:: base:: v1beta1:: Coin {
62
62
denom : amount. denom . to_string ( ) ,
63
63
amount : amount. amount . to_string ( ) ,
You can’t perform that action at this time.
0 commit comments