@@ -659,7 +659,7 @@ pub fn process_get_epoch_info(
659659 commitment_config : CommitmentConfig ,
660660) -> ProcessResult {
661661 let epoch_info: CliEpochInfo = rpc_client
662- . get_epoch_info_with_commitment ( commitment_config. clone ( ) ) ?
662+ . get_epoch_info_with_commitment ( commitment_config) ?
663663 . into ( ) ;
664664 Ok ( config. output_format . formatted_string ( & epoch_info) )
665665}
@@ -673,15 +673,15 @@ pub fn process_get_slot(
673673 rpc_client : & RpcClient ,
674674 commitment_config : CommitmentConfig ,
675675) -> ProcessResult {
676- let slot = rpc_client. get_slot_with_commitment ( commitment_config. clone ( ) ) ?;
676+ let slot = rpc_client. get_slot_with_commitment ( commitment_config) ?;
677677 Ok ( slot. to_string ( ) )
678678}
679679
680680pub fn process_get_epoch (
681681 rpc_client : & RpcClient ,
682682 commitment_config : CommitmentConfig ,
683683) -> ProcessResult {
684- let epoch_info = rpc_client. get_epoch_info_with_commitment ( commitment_config. clone ( ) ) ?;
684+ let epoch_info = rpc_client. get_epoch_info_with_commitment ( commitment_config) ?;
685685 Ok ( epoch_info. epoch . to_string ( ) )
686686}
687687
@@ -868,7 +868,7 @@ pub fn process_supply(
868868 commitment_config : CommitmentConfig ,
869869 print_accounts : bool ,
870870) -> ProcessResult {
871- let supply_response = rpc_client. supply_with_commitment ( commitment_config. clone ( ) ) ?;
871+ let supply_response = rpc_client. supply_with_commitment ( commitment_config) ?;
872872 let mut supply: CliSupply = supply_response. value . into ( ) ;
873873 supply. print_accounts = print_accounts;
874874 Ok ( config. output_format . formatted_string ( & supply) )
@@ -878,16 +878,15 @@ pub fn process_total_supply(
878878 rpc_client : & RpcClient ,
879879 commitment_config : CommitmentConfig ,
880880) -> ProcessResult {
881- let total_supply = rpc_client. total_supply_with_commitment ( commitment_config. clone ( ) ) ?;
881+ let total_supply = rpc_client. total_supply_with_commitment ( commitment_config) ?;
882882 Ok ( format ! ( "{} SOL" , lamports_to_sol( total_supply) ) )
883883}
884884
885885pub fn process_get_transaction_count (
886886 rpc_client : & RpcClient ,
887887 commitment_config : CommitmentConfig ,
888888) -> ProcessResult {
889- let transaction_count =
890- rpc_client. get_transaction_count_with_commitment ( commitment_config. clone ( ) ) ?;
889+ let transaction_count = rpc_client. get_transaction_count_with_commitment ( commitment_config) ?;
891890 Ok ( transaction_count. to_string ( ) )
892891}
893892
@@ -952,10 +951,8 @@ pub fn process_ping(
952951 Ok ( signature) => {
953952 let transaction_sent = Instant :: now ( ) ;
954953 loop {
955- let signature_status = rpc_client. get_signature_status_with_commitment (
956- & signature,
957- commitment_config. clone ( ) ,
958- ) ?;
954+ let signature_status = rpc_client
955+ . get_signature_status_with_commitment ( & signature, commitment_config) ?;
959956 let elapsed_time = Instant :: now ( ) . duration_since ( transaction_sent) ;
960957 if let Some ( transaction_status) = signature_status {
961958 match transaction_status {
0 commit comments