Browse Source

cleaned up more warnings

rachel-rose 5 years ago
parent
commit
0737809b29
6 changed files with 8 additions and 12 deletions
  1. 0 1
      src/bin/dfi.rs
  2. 0 1
      src/bin/spend-classic.rs
  3. 7 7
      src/error.rs
  4. 1 1
      src/rpc/jsonserver.rs
  5. 0 1
      src/rpc/options.rs
  6. 0 1
      src/rpc/test.rs

+ 0 - 1
src/bin/dfi.rs

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

+ 0 - 1
src/bin/spend-classic.rs

@@ -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);

+ 7 - 7
src/error.rs

@@ -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
     }
 }

+ 1 - 1
src/rpc/jsonserver.rs

@@ -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());

+ 0 - 1
src/rpc/options.rs

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

+ 0 - 1
src/rpc/test.rs

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