Skip to content

Commit

Permalink
changed defaults declarations; removed unwanted clone
Browse files Browse the repository at this point in the history
  • Loading branch information
viv-defy committed Sep 1, 2023
1 parent 572fed4 commit 8008b84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions bundler/src/db/dao/transaction_dao.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ impl TransactionDao {
let result = query.fetch_one(pool).await;
return match result {
Ok(row) => {
let mut metadata: TransactionMetadata = Default::default();
let mut metadata = TransactionMetadata::default();
match serde_json::from_value(row.metadata) {
Ok(data) => metadata = data,
Err(err) => {
Expand Down Expand Up @@ -148,7 +148,7 @@ impl TransactionDao {
}
Err(error) => {
error!("Failed to fetch transactions: {:?}", error);
Default::default()
UserTransactionWithExponent::default()
}
};
}
Expand Down Expand Up @@ -270,7 +270,7 @@ impl UserTransaction {
}
}

#[derive(Default, Clone)]
#[derive(Default)]
pub struct UserTransactionWithExponent {
pub user_transaction: UserTransaction,
pub exponent: i32,
Expand Down
2 changes: 1 addition & 1 deletion bundler/src/handlers/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@ pub async fn poll_transaction(

Ok(HttpResponse::Ok().json(BaseResponse {
data: transaction,
err: Default::default(),
err: Error::default(),
}))
}

0 comments on commit 8008b84

Please sign in to comment.