Skip to content

Commit 4e83aae

Browse files
authored
Add type ascription to fix build when telemetry feature is disabled (#2235)
1 parent 228bd22 commit 4e83aae

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

relayer/src/worker/wallet.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ use tracing::{error_span, trace};
44

55
use crate::{
66
chain::handle::ChainHandle,
7-
util::task::{spawn_background_task, Next, TaskHandle},
7+
telemetry,
8+
util::task::{spawn_background_task, Next, TaskError, TaskHandle},
89
};
910

1011
pub fn spawn_wallet_worker<Chain: ChainHandle>(chain: Chain) -> TaskHandle {
11-
use crate::{telemetry, util::task::TaskError};
12-
1312
let span = error_span!("wallet", chain = %chain.id());
1413

1514
spawn_background_task(span, Some(Duration::from_secs(5)), move || {
@@ -21,7 +20,7 @@ pub fn spawn_wallet_worker<Chain: ChainHandle>(chain: Chain) -> TaskHandle {
2120
TaskError::Ignore(format!("failed to query balance for the account: {e}"))
2221
})?;
2322

24-
let amount = balance.amount.parse().map_err(|_| {
23+
let amount: u64 = balance.amount.parse().map_err(|_| {
2524
TaskError::Ignore(format!(
2625
"failed to parse amount into u64: {}",
2726
balance.amount

0 commit comments

Comments
 (0)