Merge pull request #2465 from sesam/catchingClippy

Catching clippy
This commit is contained in:
hashmap
2019-01-24 22:00:34 +01:00
committed by GitHub
7 changed files with 18 additions and 15 deletions
+1 -1
View File
@@ -250,7 +250,7 @@ impl HeaderInfo {
/// Move value linearly toward a goal
pub fn damp(actual: u64, goal: u64, damp_factor: u64) -> u64 {
(1 * actual + (damp_factor - 1) * goal) / damp_factor
(actual + (damp_factor - 1) * goal) / damp_factor
}
/// limit value to be within some factor from a goal
+1
View File
@@ -418,6 +418,7 @@ impl Block {
/// TODO - Move this somewhere where only tests will use it.
/// *** Only used in tests. ***
///
#[warn(clippy::new_ret_no_self)]
pub fn new(
prev: &BlockHeader,
txs: Vec<Transaction>,
+2
View File
@@ -17,6 +17,8 @@
// required for genesis replacement
//! #![allow(unused_imports)]
#![cfg_attr(feature = "cargo-clippy", allow(clippy::unreadable_literal))]
use chrono::prelude::{TimeZone, Utc};
use crate::core;