Browse Source

Update formatting following Rust 1.27 update

refactor-mempool
Roman Zeyde 7 years ago
parent
commit
7372f8e239
No known key found for this signature in database GPG Key ID: 87CAE5FA46917CBB
  1. 12
      examples/bench_index.rs
  2. 14
      src/bin/electrs.rs
  3. 6
      src/index.rs
  4. 6
      src/metrics.rs

12
examples/bench_index.rs

@ -1,14 +1,10 @@
extern crate electrs; extern crate electrs;
extern crate error_chain; extern crate error_chain;
use electrs::{config::Config, use electrs::{
daemon::Daemon, config::Config, daemon::Daemon, errors::*, index, metrics::Metrics, parse::Parser,
errors::*, signal::Waiter, store::{ReadStore, Row, WriteStore}, util::Bytes,
index::Index, };
metrics::Metrics,
signal::Waiter,
store::{ReadStore, Row, WriteStore},
util::Bytes};
use error_chain::ChainedError; use error_chain::ChainedError;
struct FakeStore; struct FakeStore;

14
src/bin/electrs.rs

@ -4,16 +4,10 @@ extern crate error_chain;
use error_chain::ChainedError; use error_chain::ChainedError;
use std::time::Duration; use std::time::Duration;
use electrs::{app::App, use electrs::{
config::Config, app::App, config::Config, daemon::Daemon, errors::*, index::Index, metrics::Metrics,
daemon::Daemon, query::Query, rpc::RPC, signal::Waiter, store::{DBStore, StoreOptions},
errors::*, };
index::Index,
metrics::Metrics,
query::Query,
rpc::RPC,
signal::Waiter,
store::{DBStore, StoreOptions}};
fn run_server(config: &Config) -> Result<()> { fn run_server(config: &Config) -> Result<()> {
let signal = Waiter::new(); let signal = Waiter::new();

6
src/index.rs

@ -14,8 +14,10 @@ use daemon::Daemon;
use metrics::{Counter, Gauge, HistogramOpts, HistogramTimer, HistogramVec, MetricOpts, Metrics}; use metrics::{Counter, Gauge, HistogramOpts, HistogramTimer, HistogramVec, MetricOpts, Metrics};
use signal::Waiter; use signal::Waiter;
use store::{ReadStore, Row, WriteStore}; use store::{ReadStore, Row, WriteStore};
use util::{full_hash, hash_prefix, spawn_thread, Bytes, FullHash, HashPrefix, HeaderEntry, use util::{
HeaderList, HeaderMap, SyncChannel, HASH_PREFIX_LEN}; full_hash, hash_prefix, spawn_thread, Bytes, FullHash, HashPrefix, HeaderEntry, HeaderList,
HeaderMap, SyncChannel, HASH_PREFIX_LEN,
};
use errors::*; use errors::*;

6
src/metrics.rs

@ -3,8 +3,10 @@ use std::io;
use std::net::SocketAddr; use std::net::SocketAddr;
use tiny_http; use tiny_http;
pub use prometheus::{GaugeVec, HistogramOpts, HistogramTimer, HistogramVec, IntCounter as Counter, pub use prometheus::{
IntGauge as Gauge, Opts as MetricOpts}; GaugeVec, HistogramOpts, HistogramTimer, HistogramVec, IntCounter as Counter,
IntGauge as Gauge, Opts as MetricOpts,
};
use util::spawn_thread; use util::spawn_thread;

Loading…
Cancel
Save