From 13127e1cc843a83b00b1ee498ae07b66524d552a Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Tue, 23 Apr 2024 12:45:14 +0100 Subject: Avoid extern crate Causes issues with rust-analyzer --- src/actions/mod.rs | 1 + src/blockchain.rs | 1 + src/config.rs | 1 + src/main.rs | 8 ++------ src/wallets.rs | 1 + 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/actions/mod.rs b/src/actions/mod.rs index 14ab279..bf78414 100644 --- a/src/actions/mod.rs +++ b/src/actions/mod.rs @@ -2,6 +2,7 @@ use std::fmt; use anyhow::Result; use async_trait::async_trait; +use log::{debug, info, warn}; use serde::Deserialize; use crate::message::MessageConfig; diff --git a/src/blockchain.rs b/src/blockchain.rs index 2f5014b..92e585f 100644 --- a/src/blockchain.rs +++ b/src/blockchain.rs @@ -4,6 +4,7 @@ use bdk::{ blockchain::{ElectrumBlockchain, GetHeight}, electrum_client::{Client, ConfigBuilder, Socks5Config}, }; +use log::{debug, info, warn}; use serde::Deserialize; fn get_default_electrum_server(network: Network) -> &'static str { diff --git a/src/config.rs b/src/config.rs index 2f3e5ed..8c71646 100644 --- a/src/config.rs +++ b/src/config.rs @@ -6,6 +6,7 @@ use std::{ use anyhow::{bail, Context, Result}; use clap::Parser; use const_format::{formatcp, map_ascii_case, Case}; +use log::info; use serde::Deserialize; use crate::{ diff --git a/src/main.rs b/src/main.rs index f4a7bde..0173eb8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,16 +1,12 @@ -extern crate pretty_env_logger; -#[macro_use] -extern crate log; - use std::process::exit; use std::time::Duration; use actions::Action; +use anyhow::{bail, Context, Result}; use async_scoped::TokioScope; use clap::Parser; use human_panic::setup_panic; - -use anyhow::{bail, Context, Result}; +use log::{error, info, warn}; #[cfg(unix)] use tokio::signal::unix::{signal, SignalKind}; use tokio::time::sleep; diff --git a/src/wallets.rs b/src/wallets.rs index ca43e0a..cc4f157 100644 --- a/src/wallets.rs +++ b/src/wallets.rs @@ -13,6 +13,7 @@ use bdk::{ template::{Bip44Public, Bip49Public, Bip84Public, Bip86Public}, KeychainKind, SyncOptions, TransactionDetails, Wallet, }; +use log::{debug, error, warn}; use serde::Deserialize; use crate::blockchain::{get_blockchain, ElectrumConfig}; -- cgit v1.2.3-70-g09d2