Skip to content

Commit

Permalink
nit: remove now redundant clones
Browse files Browse the repository at this point in the history
  • Loading branch information
Farhad-Shabani committed Dec 18, 2023
1 parent c27cbe4 commit 0052973
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ibc-clients/ics07-tendermint/src/client_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ impl ClientStateCommon for ClientState {
) -> Result<(), ClientError> {
let merkle_path = apply_prefix(prefix, vec![path.to_string()]);
let merkle_proof =
MerkleProof::try_from(proof.clone()).map_err(ClientError::InvalidCommitmentProof)?;
MerkleProof::try_from(proof).map_err(ClientError::InvalidCommitmentProof)?;

Check warning on line 202 in ibc-clients/ics07-tendermint/src/client_state.rs

View check run for this annotation

Codecov / codecov/patch

ibc-clients/ics07-tendermint/src/client_state.rs#L202

Added line #L202 was not covered by tests

merkle_proof
.verify_membership(
Expand All @@ -221,7 +221,7 @@ impl ClientStateCommon for ClientState {
) -> Result<(), ClientError> {
let merkle_path = apply_prefix(prefix, vec![path.to_string()]);
let merkle_proof =
MerkleProof::try_from(proof.clone()).map_err(ClientError::InvalidCommitmentProof)?;
MerkleProof::try_from(proof).map_err(ClientError::InvalidCommitmentProof)?;

Check warning on line 224 in ibc-clients/ics07-tendermint/src/client_state.rs

View check run for this annotation

Codecov / codecov/patch

ibc-clients/ics07-tendermint/src/client_state.rs#L224

Added line #L224 was not covered by tests

merkle_proof
.verify_non_membership(&self.0.proof_specs, root.clone().into(), merkle_path)
Expand Down
2 changes: 1 addition & 1 deletion ibc-core/ics23-commitment/types/src/commitment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ impl<'a> TryFrom<&'a CommitmentProofBytes> for MerkleProof {
type Error = CommitmentError;

fn try_from(value: &'a CommitmentProofBytes) -> Result<Self, Self::Error> {
Protobuf::<RawMerkleProof>::decode(value.bytes.as_slice())
Protobuf::<RawMerkleProof>::decode(value.as_ref())
.map_err(|e| CommitmentError::DecodingFailure(e.to_string()))

Check warning on line 134 in ibc-core/ics23-commitment/types/src/commitment.rs

View check run for this annotation

Codecov / codecov/patch

ibc-core/ics23-commitment/types/src/commitment.rs#L132-L134

Added lines #L132 - L134 were not covered by tests
}
}
Expand Down

0 comments on commit 0052973

Please sign in to comment.