Fixing clippy warnings (#1568)

* Fixing clippy warnings

* Fixing more warnings
This commit is contained in:
Tomasz Drwięga
2016-07-10 13:18:33 +02:00
committed by Arkadiy Paronyan
parent ae757afe15
commit d7caae2241
9 changed files with 43 additions and 26 deletions

View File

@@ -587,14 +587,14 @@ impl Client {
}
/// Notify us that the network has been started.
pub fn network_started(&self, url: &String) {
pub fn network_started(&self, url: &str) {
let mut previous_enode = self.previous_enode.locked();
if let Some(ref u) = *previous_enode {
if u == url {
return;
}
}
*previous_enode = Some(url.clone());
*previous_enode = Some(url.into());
info!(target: "mode", "Public node URL: {}", url.apply(Colour::White.bold()));
}
}

View File

@@ -93,11 +93,11 @@ impl Default for MinerOptions {
pub struct GasPriceCalibratorOptions {
/// Base transaction price to match against.
pub usd_per_tx: f32,
/// How frequently we should recalibrate.
/// How frequently we should recalibrate.
pub recalibration_period: Duration,
}
/// The gas price validator variant for a GasPricer.
/// The gas price validator variant for a `GasPricer`.
pub struct GasPriceCalibrator {
options: GasPriceCalibratorOptions,