Merge pull request #102 from garious/rollback

Fix clippy warnings
This commit is contained in:
Greg Fitzgerald 2018-04-03 10:08:42 -06:00 committed by GitHub
commit bc0dde696a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

View File

@ -39,7 +39,7 @@ impl Accountant {
/// Create an Accountant using a deposit.
pub fn new_from_deposit(deposit: &Payment) -> Self {
let mut balances = HashMap::new();
apply_payment(&mut balances, &deposit);
apply_payment(&mut balances, deposit);
Accountant {
balances,
pending: HashMap::new(),

View File

@ -172,10 +172,9 @@ impl<W: Write + Send + 'static> AccountantSkel<W> {
let t_responder =
streamer::responder(write, exit.clone(), response_recycler.clone(), r_responder);
let skel = obj.clone();
let t_server = spawn(move || loop {
let e = AccountantSkel::process(
&skel,
&obj,
&r_reader,
&s_responder,
&packet_recycler,

View File

@ -39,8 +39,8 @@ fn main() {
.collect();
let duration = now.elapsed();
let ns = duration.as_secs() * 1_000_000_000 + u64::from(duration.subsec_nanos());
let bsps = txs as f64 / ns as f64;
let nsps = ns as f64 / txs as f64;
let bsps = f64::from(txs) / ns as f64;
let nsps = ns as f64 / f64::from(txs);
println!(
"Done. {} thousand signatures per second, {}us per signature",
bsps * 1_000_000_f64,