cleaned up more warnings

This commit is contained in:
rachel-rose
2021-05-20 16:46:56 +02:00
parent bcbe3f4ae2
commit 0737809b29
6 changed files with 8 additions and 12 deletions

View File

@@ -1,4 +1,3 @@
#[macro_use]
extern crate clap;
use async_executor::Executor;
use sapvi::rpc::options::ProgramOptions;

View File

@@ -167,7 +167,6 @@ impl SpendRevealedValues {
fn main() {
use rand::rngs::OsRng;
use std::time::Instant;
let value = 110;
let randomness_value: jubjub::Fr = jubjub::Fr::random(&mut OsRng);

View File

@@ -107,7 +107,7 @@ impl fmt::Display for Error {
// TODO: Match statement to parse external errors into strings.
impl From<zeromq::ZmqError> for Error {
fn from(err: zeromq::ZmqError) -> Error {
fn from(_err: zeromq::ZmqError) -> Error {
Error::ZMQError
}
}
@@ -119,31 +119,31 @@ impl From<std::io::Error> for Error {
}
impl From<rusqlite::Error> for Error {
fn from(err: rusqlite::Error) -> Error {
fn from(_err: rusqlite::Error) -> Error {
Error::RusqliteError
}
}
impl From<ZKVMError> for Error {
fn from(err: ZKVMError) -> Error {
fn from(_err: ZKVMError) -> Error {
Error::VMError
}
}
impl From<bellman::SynthesisError> for Error {
fn from(err: bellman::SynthesisError) -> Error {
fn from(_err: bellman::SynthesisError) -> Error {
Error::Groth16Error
}
}
impl<T> From<async_channel::SendError<T>> for Error {
fn from(err: async_channel::SendError<T>) -> Error {
fn from(_err: async_channel::SendError<T>) -> Error {
Error::AsyncChannelError
}
}
impl From<async_channel::RecvError> for Error {
fn from(err: async_channel::RecvError) -> Error {
fn from(_err: async_channel::RecvError) -> Error {
Error::AsyncChannelError
}
}
@@ -180,7 +180,7 @@ impl From<std::string::FromUtf8Error> for Error {
}
impl From<state::VerifyFailed> for Error {
fn from(err: state::VerifyFailed) -> Error {
fn from(_err: state::VerifyFailed) -> Error {
Error::VerifyFailed
}
}

View File

@@ -71,7 +71,7 @@ pub async fn listen(
}
}
pub async fn start(executor: Arc<Executor<'_>>, options: ProgramOptions, adapter: Arc<RpcAdapter>) -> Result<()> {
pub async fn start(executor: Arc<Executor<'_>>, options: ProgramOptions, _adapter: Arc<RpcAdapter>) -> Result<()> {
let p2p = net::P2p::new(options.network_settings);
let rpc = RpcInterface::new(p2p.clone());

View File

@@ -1,4 +1,3 @@
#[macro_use]
use std::net::SocketAddr;
use crate::{net, Result};

View File

@@ -1 +0,0 @@
fn foo() {}