From e334d2ca2b8d2877f95579ffd7f80d7588e43132 Mon Sep 17 00:00:00 2001 From: ghassmo Date: Wed, 30 Jun 2021 20:32:47 +0300 Subject: [PATCH] clear warning messages --- src/bin/darkfid.rs | 6 +++--- src/crypto/fr_serial.rs | 2 +- src/crypto/merkle.rs | 2 +- src/rpc/adapter.rs | 4 ++-- src/rpc/jsonserver.rs | 2 +- src/wallet/walletdb.rs | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/bin/darkfid.rs b/src/bin/darkfid.rs index fac0f19ac..ca9f6dd9b 100644 --- a/src/bin/darkfid.rs +++ b/src/bin/darkfid.rs @@ -1,6 +1,6 @@ use async_std::sync::Arc; //use drk::rpc:: -use drk::rpc::adapter::{AdapterPtr, RpcAdapter}; +use drk::rpc::adapter::{RpcAdapter}; use drk::rpc::jsonserver; //use drk::rpc::options::ProgramOptions; use rand::rngs::OsRng; @@ -27,7 +27,7 @@ use bellman::groth16; use bls12_381::Bls12; use easy_parallel::Parallel; use ff::Field; -use log::*; + use std::path::Path; #[allow(dead_code)] @@ -102,7 +102,7 @@ impl State { witness.append(node).expect("append to witness"); } - if let Some((note, secret)) = self.try_decrypt_note(enc_note).await { + if let Some((note, _secret)) = self.try_decrypt_note(enc_note).await { // We need to keep track of the witness for this coin. // This allows us to prove inclusion of the coin in the merkle tree with ZK. // Just as we update the merkle tree with every new coin, so we do the same with diff --git a/src/crypto/fr_serial.rs b/src/crypto/fr_serial.rs index f19955290..9459e8ee3 100644 --- a/src/crypto/fr_serial.rs +++ b/src/crypto/fr_serial.rs @@ -1,7 +1,7 @@ use group::GroupEncoding; use std::io; -use crate::crypto::{merkle::IncrementalWitness, merkle_node::MerkleNode}; + use crate::error::{Error, Result}; use crate::serial::{Decodable, Encodable, ReadExt, WriteExt}; diff --git a/src/crypto/merkle.rs b/src/crypto/merkle.rs index fce1fa1ae..70d76eddd 100644 --- a/src/crypto/merkle.rs +++ b/src/crypto/merkle.rs @@ -2,7 +2,7 @@ //! of notes. //use byteorder::{LittleEndian, ReadBytesExt}; -use crate::serial::{Decodable, Encodable, VarInt}; +use crate::serial::{Decodable, Encodable}; use crate::{Error, Result}; use std::collections::VecDeque; use std::io; diff --git a/src/rpc/adapter.rs b/src/rpc/adapter.rs index b20eddd38..1a352cff6 100644 --- a/src/rpc/adapter.rs +++ b/src/rpc/adapter.rs @@ -1,4 +1,4 @@ -use crate::wallet::{WalletDB, WalletPtr}; +use crate::wallet::{WalletDB}; use crate::Result; use async_std::sync::Arc; use log::*; @@ -25,7 +25,7 @@ impl RpcAdapter { pub async fn cash_key_gen(&self) -> Result<()> { debug!(target: "adapter", "key_gen() [START]"); - let (public, private) = self.wallet.key_gen().await; + let (_public, _private) = self.wallet.key_gen().await; //self.wallet.put_keypair(public, private).await?; Ok(()) } diff --git a/src/rpc/jsonserver.rs b/src/rpc/jsonserver.rs index c136feddb..1933ef3fb 100644 --- a/src/rpc/jsonserver.rs +++ b/src/rpc/jsonserver.rs @@ -1,6 +1,6 @@ use crate::rpc::adapter::RpcAdapter; use crate::service::ClientProgramOptions; -use crate::{net, Error, Result}; +use crate::{Error, Result}; use async_executor::Executor; use async_native_tls::TlsAcceptor; use async_std::sync::Mutex; diff --git a/src/wallet/walletdb.rs b/src/wallet/walletdb.rs index 785b92bbc..55c7f6fac 100644 --- a/src/wallet/walletdb.rs +++ b/src/wallet/walletdb.rs @@ -7,8 +7,8 @@ use async_std::sync::{Arc, Mutex}; use ff::Field; use log::*; use rand::rngs::OsRng; -use rusqlite::{named_params, Connection, OpenFlags}; -use std::path::{Path, PathBuf}; +use rusqlite::{named_params, Connection}; +use std::path::{PathBuf}; pub type WalletPtr = Arc;