Cleanup build warnings (#1391)

* cleanup some unused vars etc.

* rustfmt
This commit is contained in:
Antioch Peverell 2018-08-20 21:56:32 +01:00 committed by GitHub
parent bb7bc2c4f2
commit 7ca4d45bf5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View file

@ -25,9 +25,7 @@ use lmdb;
use core::core::hash::{Hash, Hashed}; use core::core::hash::{Hash, Hashed};
use core::core::merkle_proof::MerkleProof; use core::core::merkle_proof::MerkleProof;
use core::core::target::Difficulty; use core::core::target::Difficulty;
use core::core::{ use core::core::{Block, BlockHeader, Output, OutputIdentifier, Transaction, TxKernel};
Block, BlockHeader, Output, OutputFeatures, OutputIdentifier, Transaction, TxKernel,
};
use core::global; use core::global;
use error::{Error, ErrorKind}; use error::{Error, ErrorKind};
use grin_store::Error::NotFoundErr; use grin_store::Error::NotFoundErr;
@ -396,7 +394,7 @@ impl Chain {
let res = txhashset.is_unspent(output_ref); let res = txhashset.is_unspent(output_ref);
match res { match res {
Err(e) => Err(e), Err(e) => Err(e),
Ok((h, p)) => Ok(h), Ok((h, _)) => Ok(h),
} }
} }

View file

@ -20,7 +20,7 @@ use std::sync::Arc;
use conn::{Message, MessageHandler, Response}; use conn::{Message, MessageHandler, Response};
use core::core; use core::core;
use core::core::hash::{Hash, Hashed}; use core::core::hash::Hash;
use msg::{ use msg::{
BanReason, GetPeerAddrs, Headers, Locator, PeerAddrs, Ping, Pong, SockAddr, TxHashSetArchive, BanReason, GetPeerAddrs, Headers, Locator, PeerAddrs, Ping, Pong, SockAddr, TxHashSetArchive,
TxHashSetRequest, Type, TxHashSetRequest, Type,
@ -120,7 +120,6 @@ impl MessageHandler for Protocol {
"handle_payload: received block: msg_len: {}", msg.header.msg_len "handle_payload: received block: msg_len: {}", msg.header.msg_len
); );
let b: core::Block = msg.body()?; let b: core::Block = msg.body()?;
let bh = b.hash();
adapter.block_received(b, self.addr); adapter.block_received(b, self.addr);
Ok(None) Ok(None)
@ -161,7 +160,6 @@ impl MessageHandler for Protocol {
"handle_payload: received compact block: msg_len: {}", msg.header.msg_len "handle_payload: received compact block: msg_len: {}", msg.header.msg_len
); );
let b: core::CompactBlock = msg.body()?; let b: core::CompactBlock = msg.body()?;
let bh = b.hash();
adapter.compact_block_received(b, self.addr); adapter.compact_block_received(b, self.addr);
Ok(None) Ok(None)