Skip to content

Commit

Permalink
nit: remove redundant clones
Browse files Browse the repository at this point in the history
  • Loading branch information
Farhad-Shabani committed Feb 9, 2024
1 parent 10bf306 commit 932eaa2
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions ibc-testkit/tests/core/ics02_client/update_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,23 +160,18 @@ fn test_update_client_with_prev_header() {
latest_height,
);

let msg_2 = build_msg_from_header(
chain_id_b.clone(),
client_id.clone(),
height_2,
latest_height,
);
let msg_2 = build_msg_from_header(chain_id_b, client_id.clone(), height_2, latest_height);

// First, submit a header with `height_2` to set the client's latest
// height to `height_2`.
let _ = validate(&ctx, &router, msg_2.clone());
let _ = execute(&mut ctx, &mut router, msg_2.clone());
let _ = execute(&mut ctx, &mut router, msg_2);

// Then, submit a header with `height_1` to see if the client's latest
// height remains `height_2` and the consensus state is stored at the
// correct path (`height_1`).
let _ = validate(&ctx, &router, msg_1.clone());
let _ = execute(&mut ctx, &mut router, msg_1.clone());
let _ = execute(&mut ctx, &mut router, msg_1);

let client_state = ctx.client_state(&client_id).unwrap();
assert_eq!(client_state.latest_height(), height_2);
Expand Down

0 comments on commit 932eaa2

Please sign in to comment.