Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
keppel committed Sep 18, 2024
1 parent 4706aa0 commit 764679d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1451,9 +1451,9 @@ impl Dest {
}
}

impl ToString for Dest {
fn to_string(&self) -> String {
serde_json::to_string(self).unwrap()
impl std::fmt::Display for Dest {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", serde_json::to_string(self).unwrap())
}
}

Expand Down
11 changes: 4 additions & 7 deletions src/bin/nomic.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//! This binary provides the command-line interface for running a Nomic full
//! node, as well as client commands for querying and broadcasting transactions.
#![warn(missing_docs)]
#![warn(clippy::missing_docs_in_private_items)]
#![feature(trivial_bounds)]
#![allow(incomplete_features)]
#![feature(specialization)]
Expand All @@ -13,11 +11,12 @@
use alloy::network::EthereumWallet;
#[cfg(feature = "ethereum")]
use alloy::signers::local::LocalSigner;
#[cfg(feature = "ethereum")]
use nomic::bitcoin::deposit_index::DepositIndex;

use bitcoin::consensus::{Decodable, Encodable};
use bitcoin::secp256k1::{self, Message};
#[cfg(feature = "ethereum")]
use bitcoin::secp256k1::Message;
use bitcoin::secp256k1::{self};

use bitcoin::util::bip32::ExtendedPubKey;
use bitcoincore_rpc_async::RpcApi;
use bitcoincore_rpc_async::{Auth, Client as BtcClient};
Expand Down Expand Up @@ -51,11 +50,9 @@ use std::fs::Permissions;
use std::os::unix::fs::PermissionsExt;
use std::path::PathBuf;
use std::str::FromStr;
use std::sync::Arc;
use std::time::SystemTime;
use std::time::UNIX_EPOCH;
use tendermint_rpc::Client as _;
use tokio::sync::Mutex;

const BANNER: &str = r#"
███╗ ██╗ ██████╗ ███╗ ███╗ ██╗ ██████╗
Expand Down
4 changes: 1 addition & 3 deletions src/bitcoin/relayer.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(async_closure)]
use super::signatory::Signatory;
use super::SignatorySet;
use super::SIGSET_THRESHOLD;
Expand All @@ -11,7 +10,6 @@ use crate::error::Result;
use crate::orga::encoding::Encode;
use crate::utils::time_now;
use bitcoin::consensus::{Decodable, Encodable};
use bitcoin::TxOut;
use bitcoin::Txid;
use bitcoin::{hashes::Hash, Block, BlockHash, Transaction};
use bitcoincore_rpc_async::{json::GetBlockHeaderResult, Client as BitcoinRpcClient, RpcApi};
Expand Down Expand Up @@ -853,7 +851,7 @@ impl Relayer {
let mut matches = Vec::new();
for (vout, output) in tx.output.iter().enumerate() {
let mut script_bytes = vec![];
let encode: usize = output
let _encode: usize = output
.script_pubkey
.consensus_encode(&mut script_bytes)
.unwrap();
Expand Down

0 comments on commit 764679d

Please sign in to comment.