remove unnecessary #[allow(dead_code)]

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2025-04-16 15:48:11 -04:00
parent 3dccdf2bad
commit 0adaafd523
3 changed files with 5 additions and 18 deletions

View File

@@ -22,7 +22,6 @@ pub enum WalletState<'a> {
}, },
} }
#[allow(dead_code)]
pub fn get_wallet_for_mut<'a>( pub fn get_wallet_for_mut<'a>(
accounts: &'a mut Accounts, accounts: &'a mut Accounts,
global_wallet: &'a mut GlobalWallet, global_wallet: &'a mut GlobalWallet,
@@ -151,14 +150,12 @@ impl TokenSerializable for Wallet {
} }
} }
#[allow(dead_code)]
pub struct GlobalWallet { pub struct GlobalWallet {
pub wallet: Option<Wallet>, pub wallet: Option<Wallet>,
pub ui_state: WalletUIState, pub ui_state: WalletUIState,
wallet_handler: TokenHandler, wallet_handler: TokenHandler,
} }
#[allow(dead_code)]
impl GlobalWallet { impl GlobalWallet {
pub fn new(path: &DataPath) -> Self { pub fn new(path: &DataPath) -> Self {
let wallet_handler = let wallet_handler =

View File

@@ -13,7 +13,6 @@ use super::{
type ZapId = u32; type ZapId = u32;
#[allow(dead_code)]
#[derive(Default)] #[derive(Default)]
pub struct Zaps { pub struct Zaps {
next_id: ZapId, next_id: ZapId,
@@ -26,7 +25,6 @@ pub struct Zaps {
events: Vec<EventResponse>, events: Vec<EventResponse>,
} }
#[allow(dead_code)]
fn process_event( fn process_event(
id: ZapId, id: ZapId,
event: ZapEvent, event: ZapEvent,
@@ -125,7 +123,6 @@ fn process_new_zap_event(
NextState::Transition(promise) NextState::Transition(promise)
} }
#[allow(dead_code)]
fn send_note_zap( fn send_note_zap(
ndb: &Ndb, ndb: &Ndb,
txn: &Transaction, txn: &Transaction,
@@ -208,7 +205,6 @@ struct EventResponse {
event: Result<ZapEvent, ZappingError>, event: Result<ZapEvent, ZappingError>,
} }
#[allow(dead_code)]
impl Zaps { impl Zaps {
fn get_next_id(&mut self) -> ZapId { fn get_next_id(&mut self) -> ZapId {
let next = self.next_id; let next = self.next_id;
@@ -405,7 +401,6 @@ pub enum AnyZapState {
Confirmed, Confirmed,
} }
#[allow(dead_code)]
#[derive(Debug)] #[derive(Debug)]
pub enum ZapState { pub enum ZapState {
Confirm(Zap), Confirm(Zap),
@@ -446,7 +441,6 @@ pub struct ZapCtx {
msats: u64, msats: u64,
} }
#[allow(dead_code)]
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub enum ZapEvent { pub enum ZapEvent {
FetchInvoice { FetchInvoice {
@@ -464,7 +458,6 @@ pub enum ZapEvent {
}, },
} }
#[allow(dead_code)]
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub enum ZappingError { pub enum ZappingError {
InvoiceFetchFailed(ZapError), InvoiceFetchFailed(ZapError),
@@ -552,22 +545,20 @@ impl PromiseResponse {
} }
} }
#[allow(dead_code)]
#[derive(Debug, PartialEq, Eq, Clone, Hash)] #[derive(Debug, PartialEq, Eq, Clone, Hash)]
pub enum ZapTargetOwned { pub enum ZapTargetOwned {
Profile(Pubkey), Profile(Pubkey),
Note(NoteZapTargetOwned), Note(NoteZapTargetOwned),
} }
#[allow(dead_code)]
#[derive(Debug, Hash)] #[derive(Debug, Hash)]
pub enum ZapTarget<'a> { pub enum ZapTarget<'a> {
Profile(&'a [u8; 32]), Profile(&'a [u8; 32]),
Note(NoteZapTarget<'a>), Note(NoteZapTarget<'a>),
} }
#[allow(dead_code)]
impl ZapTargetOwned { impl ZapTargetOwned {
#[allow(dead_code)]
pub fn pubkey(&self) -> &Pubkey { pub fn pubkey(&self) -> &Pubkey {
match &self { match &self {
ZapTargetOwned::Profile(pubkey) => pubkey, ZapTargetOwned::Profile(pubkey) => pubkey,
@@ -576,7 +567,6 @@ impl ZapTargetOwned {
} }
} }
#[allow(dead_code)]
#[derive(Debug, PartialEq, Eq, Clone, Hash)] #[derive(Debug, PartialEq, Eq, Clone, Hash)]
pub struct NoteZapTargetOwned { pub struct NoteZapTargetOwned {
pub note_id: NoteId, pub note_id: NoteId,

View File

@@ -6,7 +6,6 @@ use serde::Deserialize;
use tokio::task::JoinError; use tokio::task::JoinError;
use url::Url; use url::Url;
#[allow(dead_code)]
pub struct FetchedInvoice { pub struct FetchedInvoice {
pub invoice: String, pub invoice: String,
pub request_noteid: NoteId, // note id of kind 9734 request pub request_noteid: NoteId, // note id of kind 9734 request
@@ -100,21 +99,24 @@ fn make_kind_9734<'a>(
builder.sign(sender_nsec).build().expect("note") builder.sign(sender_nsec).build().expect("note")
} }
#[allow(dead_code)]
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
pub struct LNUrlPayRequest { pub struct LNUrlPayRequest {
#[allow(dead_code)]
#[serde(rename = "allowsNostr")] #[serde(rename = "allowsNostr")]
allow_nostr: bool, allow_nostr: bool,
#[allow(dead_code)]
#[serde(rename = "nostrPubkey")] #[serde(rename = "nostrPubkey")]
nostr_pubkey: String, nostr_pubkey: String,
#[serde(rename = "callback")] #[serde(rename = "callback")]
callback_url: String, callback_url: String,
#[allow(dead_code)]
#[serde(rename = "minSendable")] #[serde(rename = "minSendable")]
min_sendable: u64, min_sendable: u64,
#[allow(dead_code)]
#[serde(rename = "maxSendable")] #[serde(rename = "maxSendable")]
max_sendable: u64, max_sendable: u64,
} }
@@ -143,7 +145,6 @@ fn endpoint_query_for_invoice<'a>(
.finish()) .finish())
} }
#[allow(dead_code)]
pub fn fetch_invoice_lud16( pub fn fetch_invoice_lud16(
lud16: String, lud16: String,
msats: u64, msats: u64,
@@ -156,7 +157,6 @@ pub fn fetch_invoice_lud16(
})) }))
} }
#[allow(dead_code)]
pub fn fetch_invoice_lnurl( pub fn fetch_invoice_lnurl(
lnurl: String, lnurl: String,
msats: u64, msats: u64,