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
3030 fn try_from (
3131 proto : & proto:: cosmos:: distribution:: v1beta1:: MsgFundCommunityPool ,
3232 ) -> 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 {
3535 amounts. push ( Coin {
3636 denom : amount. denom . parse ( ) ?,
3737 amount : amount. amount . parse ( ) ?,
@@ -56,8 +56,8 @@ impl From<&MsgFundCommunityPool> for proto::cosmos::distribution::v1beta1::MsgFu
5656 fn from (
5757 msg : & MsgFundCommunityPool ,
5858 ) -> 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 {
6161 amounts. push ( proto:: cosmos:: base:: v1beta1:: Coin {
6262 denom : amount. denom . to_string ( ) ,
6363 amount : amount. amount . to_string ( ) ,
You can’t perform that action at this time.
0 commit comments