Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Clean up use to keep rust 1.43.0 from complaining (#9740) (#9749)
Browse files Browse the repository at this point in the history
automerge
  • Loading branch information
mergify[bot] authored Apr 28, 2020
1 parent 9c6f613 commit fbcc107
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 47 deletions.
1 change: 0 additions & 1 deletion archiver-lib/src/result.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use serde_json;
use solana_client::client_error;
use solana_ledger::blockstore;
use solana_sdk::transport;
Expand Down
1 change: 0 additions & 1 deletion core/src/crds_gossip_pull.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use crate::crds::Crds;
use crate::crds_gossip::{get_stake, get_weight, CRDS_GOSSIP_DEFAULT_BLOOM_ITEMS};
use crate::crds_gossip_error::CrdsGossipError;
use crate::crds_value::{CrdsValue, CrdsValueLabel};
use rand;
use rand::distributions::{Distribution, WeightedIndex};
use rand::Rng;
use solana_runtime::bloom::Bloom;
Expand Down
2 changes: 0 additions & 2 deletions core/src/poh_service.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
//! The `poh_service` module implements a service that records the passing of
//! "ticks", a measure of time in the PoH stream
use crate::poh_recorder::PohRecorder;
use core_affinity;
use solana_sdk::clock::DEFAULT_TICKS_PER_SLOT;
use solana_sdk::poh_config::PohConfig;
use solana_sys_tuner;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::{Arc, Mutex};
use std::thread::{self, sleep, Builder, JoinHandle};
Expand Down
1 change: 0 additions & 1 deletion install/src/main-install-init.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use atty;
use std::process::exit;

fn press_enter() {
Expand Down
2 changes: 0 additions & 2 deletions keygen/src/keygen.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use bip39::{Language, Mnemonic, MnemonicType, Seed};
use bs58;
use clap::{
crate_description, crate_name, value_t, values_t_or_exit, App, AppSettings, Arg, ArgMatches,
SubCommand,
};
use num_cpus;
use solana_clap_utils::{
input_validators::is_derivation,
keypair::{
Expand Down
1 change: 0 additions & 1 deletion ledger-tool/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use clap::{
crate_description, crate_name, value_t, value_t_or_exit, values_t_or_exit, App, Arg,
ArgMatches, SubCommand,
};
use histogram;
use serde_json::json;
use solana_clap_utils::input_validators::is_slot;
use solana_ledger::{
Expand Down
1 change: 0 additions & 1 deletion ledger/src/blockstore_db.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::blockstore_meta;
use bincode::{deserialize, serialize};
use byteorder::{BigEndian, ByteOrder};
use fs_extra;
use log::*;
pub use rocksdb::Direction as IteratorDirection;
use rocksdb::{
Expand Down
10 changes: 2 additions & 8 deletions net-utils/src/ip_echo_server.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
use bytes::Bytes;
use log::*;
use serde_derive::{Deserialize, Serialize};
use std::io;
use std::net::SocketAddr;
use std::time::Duration;
use tokio;
use tokio::net::TcpListener;
use tokio::prelude::*;
use tokio::reactor::Handle;
use tokio::runtime::Runtime;
use std::{io, net::SocketAddr, time::Duration};
use tokio::{net::TcpListener, prelude::*, reactor::Handle, runtime::Runtime};
use tokio_codec::{BytesCodec, Decoder};

pub type IpEchoServer = Runtime;
Expand Down
1 change: 0 additions & 1 deletion programs/btc_spv/src/spv_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use crate::spv_instruction::*;
use crate::spv_state::*;
#[allow(unused_imports)]
use crate::utils::*;
use hex;
use log::*;
use solana_sdk::account::KeyedAccount;
use solana_sdk::instruction::InstructionError;
Expand Down
3 changes: 0 additions & 3 deletions programs/btc_spv_bin/src/block.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use clap;
use clap::{App, Arg};
use hex;
use reqwest;
use std::fs::File;
use std::io::prelude::*;

Expand Down
2 changes: 0 additions & 2 deletions programs/btc_spv_bin/src/blockheade.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use clap;
use clap::{App, Arg};
use reqwest;
use serde_derive::Deserialize;

// pub type blockHash = [u8; 32];
Expand Down
44 changes: 22 additions & 22 deletions sdk/src/signers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,33 @@ pub trait Signers {
}

macro_rules! default_keypairs_impl {
() => (
fn pubkeys(&self) -> Vec<Pubkey> {
self.iter().map(|keypair| keypair.pubkey()).collect()
}
() => {
fn pubkeys(&self) -> Vec<Pubkey> {
self.iter().map(|keypair| keypair.pubkey()).collect()
}

fn try_pubkeys(&self) -> Result<Vec<Pubkey>, SignerError> {
let mut pubkeys = Vec::new();
for keypair in self.iter() {
pubkeys.push(keypair.try_pubkey()?);
}
Ok(pubkeys)
fn try_pubkeys(&self) -> Result<Vec<Pubkey>, SignerError> {
let mut pubkeys = Vec::new();
for keypair in self.iter() {
pubkeys.push(keypair.try_pubkey()?);
}
Ok(pubkeys)
}

fn sign_message(&self, message: &[u8]) -> Vec<Signature> {
self.iter()
.map(|keypair| keypair.sign_message(message))
.collect()
}
fn sign_message(&self, message: &[u8]) -> Vec<Signature> {
self.iter()
.map(|keypair| keypair.sign_message(message))
.collect()
}

fn try_sign_message(&self, message: &[u8]) -> Result<Vec<Signature>, SignerError> {
let mut signatures = Vec::new();
for keypair in self.iter() {
signatures.push(keypair.try_sign_message(message)?);
}
Ok(signatures)
fn try_sign_message(&self, message: &[u8]) -> Result<Vec<Signature>, SignerError> {
let mut signatures = Vec::new();
for keypair in self.iter() {
signatures.push(keypair.try_sign_message(message)?);
}
);
Ok(signatures)
}
};
}

impl<T: Signer> Signers for [&T] {
Expand Down
1 change: 0 additions & 1 deletion transaction-status/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#[macro_use]
extern crate serde_derive;

use bincode;
use solana_sdk::{
clock::Slot,
commitment_config::CommitmentConfig,
Expand Down
1 change: 0 additions & 1 deletion upload-perf/src/upload-perf.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use serde_json;
use serde_json::Value;
use std::collections::HashMap;
use std::env;
Expand Down

0 comments on commit fbcc107

Please sign in to comment.