Skip to content

Commit 368402e

Browse files
committed
fix: clippy
Signed-off-by: William Hankins <william@sundae.fi>
1 parent 0cc0ee3 commit 368402e

File tree

3 files changed

+6
-20
lines changed

3 files changed

+6
-20
lines changed

modules/address_state/src/address_state.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,6 @@ impl AddressState {
251251
)),
252252
}
253253
}
254-
AddressStateQuery::GetAddressesAssets { addresses } => {
255-
match state.get_addresses_assets(addresses).await {
256-
Ok(assets) => AddressStateQueryResponse::AddressesAssets(assets),
257-
Err(e) => AddressStateQueryResponse::Error(QueryError::internal_error(
258-
e.to_string(),
259-
)),
260-
}
261-
}
262254
AddressStateQuery::GetAddressesTotals { addresses } => {
263255
match state.get_addresses_totals(addresses).await {
264256
Ok(totals) => AddressStateQueryResponse::AddressesTotals(totals),

modules/rest_blockfrost/src/handlers/accounts.rs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::sync::Arc;
33

44
use crate::handlers_config::HandlersConfig;
55
use crate::types::{
6-
AccountAddressREST, AccountRewardREST, AccountUTxOREST, AccountWithdrawalREST,
6+
AccountAddressREST, AccountRewardREST, AccountUTxOREST, AccountWithdrawalREST, AmountList,
77
DelegationUpdateREST, RegistrationUpdateREST,
88
};
99
use acropolis_common::messages::{Message, RESTResponse, StateQuery, StateQueryResponse};
@@ -21,12 +21,6 @@ use anyhow::{anyhow, Result};
2121
use blake2::{Blake2b512, Digest};
2222
use caryatid_sdk::Context;
2323

24-
use crate::handlers_config::HandlersConfig;
25-
use crate::types::{
26-
AccountAddressREST, AccountRewardREST, AccountTotalsREST, AccountUTxOREST,
27-
AccountWithdrawalREST, AmountList, DelegationUpdateREST, RegistrationUpdateREST,
28-
};
29-
3024
#[derive(serde::Serialize)]
3125
pub struct StakeAccountRest {
3226
pub utxo_value: u64,
@@ -668,7 +662,7 @@ pub async fn handle_account_assets_blockfrost(
668662
AccountsStateQueryResponse::AccountAssociatedAddresses(addresses),
669663
)) => Ok(Some(addresses)),
670664
Message::StateQueryResponse(StateQueryResponse::Accounts(
671-
AccountsStateQueryResponse::NotFound,
665+
AccountsStateQueryResponse::Error(QueryError::NotFound { .. }),
672666
)) => Ok(None),
673667
Message::StateQueryResponse(StateQueryResponse::Accounts(
674668
AccountsStateQueryResponse::Error(e),
@@ -750,9 +744,9 @@ pub async fn handle_account_assets_blockfrost(
750744

751745
/// Handle `/accounts/{stake_address}/addresses/total` Blockfrost-compatible endpoint
752746
pub async fn handle_account_totals_blockfrost(
753-
context: Arc<Context<Message>>,
754-
params: Vec<String>,
755-
handlers_config: Arc<HandlersConfig>,
747+
_context: Arc<Context<Message>>,
748+
_params: Vec<String>,
749+
_handlers_config: Arc<HandlersConfig>,
756750
) -> Result<RESTResponse> {
757751
Ok(RESTResponse::with_text(501, "Not implemented"))
758752
}

modules/rest_blockfrost/src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ pub struct AccountUTxOREST {
939939
}
940940

941941
#[derive(serde::Serialize)]
942-
pub struct AccountTotalsREST {
942+
pub struct _AccountTotalsREST {
943943
pub stake_address: String,
944944
pub received_sum: AmountList,
945945
pub sent_sum: AmountList,

0 commit comments

Comments
 (0)