Skip to content
This repository was archived by the owner on Mar 23, 2021. It is now read-only.

Commit 2781b95

Browse files
author
Tobin C. Harding
committed
Do not clone swap_id
1 parent a4c7f7f commit 2781b95

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cnd/tests/db.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ async fn accepted_at_for_bitcoin_ethereum() -> anyhow::Result<NaiveDateTime> {
6363
db.save(request).await?;
6464

6565
let accept: Accept<Bitcoin, Ethereum> = Accept {
66-
swap_id: swap_id.clone(),
66+
swap_id,
6767
beta_ledger_refund_identity: ethereum_address(), // This is non-sense but fine for this test
6868
alpha_ledger_redeem_identity: bitcoin_address(), // same address for refund/redeem.
6969
};
@@ -89,11 +89,11 @@ async fn accepted_at_for_ethereum_bitcoin() -> anyhow::Result<NaiveDateTime> {
8989
.into_temp_path();
9090
let db = Sqlite::new(&db_path).expect("db");
9191

92-
let swap = swap(swap_id.clone(), role);
92+
let swap = swap(swap_id, role);
9393
db.save(swap).await?;
9494

9595
let request = Request {
96-
swap_id: swap_id.clone(),
96+
swap_id,
9797
alpha_ledger: Ethereum::default(),
9898
beta_ledger: Bitcoin::default(),
9999
alpha_asset: EtherQuantity::zero(),
@@ -108,7 +108,7 @@ async fn accepted_at_for_ethereum_bitcoin() -> anyhow::Result<NaiveDateTime> {
108108
db.save(request).await?;
109109

110110
let accept: Accept<Ethereum, Bitcoin> = Accept {
111-
swap_id: swap_id.clone(),
111+
swap_id,
112112
beta_ledger_refund_identity: bitcoin_address(), // This is non-sense but fine for this test
113113
alpha_ledger_redeem_identity: ethereum_address(), // same address for refund/redeem.
114114
};

0 commit comments

Comments
 (0)