Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ZenGround0 committed Oct 10, 2022
1 parent d92c57c commit 6b3f1cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
15 changes: 4 additions & 11 deletions actors/datacap/tests/datacap_actor_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,8 @@ mod mint {

// transfer of an allowance *does* deduct allowance even though it is too small to matter in practice
let operator_data = RawBytes::new(vec![1, 2, 3, 4]);
h.transfer_from(
&mut rt,
&*BOB,
&*ALICE,
&h.governor,
&(2 * amt.clone()),
operator_data.clone(),
)
.unwrap();
h.transfer_from(&mut rt, &*BOB, &*ALICE, &h.governor, &(2 * amt.clone()), operator_data)
.unwrap();
let allowance3 = h.get_allowance_between(&rt, &*ALICE, &*BOB);
assert!(allowance3.eq(&INFINITE_ALLOWANCE.clone().sub(2 * amt.clone())));

Expand Down Expand Up @@ -186,7 +179,7 @@ mod transfer {
expect_abort_contains_message(
ExitCode::USR_FORBIDDEN,
"transfer not allowed",
h.transfer_from(&mut rt, &*BOB, &h.governor, &*ALICE, &amt, operator_data.clone()),
h.transfer_from(&mut rt, &*BOB, &h.governor, &*ALICE, &amt, operator_data),
);
rt.reset();
}
Expand Down Expand Up @@ -223,7 +216,7 @@ mod destroy {
);

// Destroying from 0 allowance having governor works
assert!(h.get_allowance_between(&mut rt, &*ALICE, &h.governor).is_zero());
assert!(h.get_allowance_between(&rt, &*ALICE, &h.governor).is_zero());
let ret = h.destroy(&mut rt, &*ALICE, &amt).unwrap();
assert_eq!(ret.balance, amt); // burned 2 amt - amt = amt
h.check_state(&rt)
Expand Down
2 changes: 1 addition & 1 deletion actors/datacap/tests/harness/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl Harness {
) -> Result<BurnReturn, ActorError> {
rt.expect_validate_caller_addr(vec![VERIFIED_REGISTRY_ACTOR_ADDR]);

let params = DestroyParams { owner: owner.clone(), amount: amount.clone() };
let params = DestroyParams { owner, amount: amount.clone() };

rt.set_caller(*VERIFREG_ACTOR_CODE_ID, VERIFIED_REGISTRY_ACTOR_ADDR);
let ret =
Expand Down

0 comments on commit 6b3f1cf

Please sign in to comment.