Moved StopGaurd to it's own crate (#7635)

This commit is contained in:
Marek Kotewicz 2018-01-19 13:46:31 +01:00 committed by GitHub
parent d430e7f4e2
commit 6bebb9e74a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 4 deletions

5
Cargo.lock generated
View File

@ -486,6 +486,7 @@ dependencies = [
"semantic_version 0.1.0",
"snappy 0.1.0 (git+https://github.com/paritytech/rust-snappy)",
"stats 0.1.0",
"stop-guard 0.1.0",
"table 0.1.0",
"time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
"triehash 0.1.0",
@ -2975,6 +2976,10 @@ dependencies = [
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "stop-guard"
version = "0.1.0"
[[package]]
name = "strsim"
version = "0.6.0"

View File

@ -21,9 +21,7 @@ extern crate rand;
mod random_path;
mod test_socket;
mod stop_guard;
pub mod http_client;
pub use random_path::*;
pub use test_socket::*;
pub use stop_guard::*;

View File

@ -53,6 +53,7 @@ kvdb-rocksdb = { path = "../util/kvdb-rocksdb" }
kvdb-memorydb = { path = "../util/kvdb-memorydb" }
util-error = { path = "../util/error" }
snappy = { git = "https://github.com/paritytech/rust-snappy" }
stop-guard = { path = "../util/stop-guard" }
migration = { path = "../util/migration" }
macros = { path = "../util/macros" }
rust-crypto = "0.2.34"

View File

@ -105,6 +105,7 @@ extern crate migration;
extern crate rlp_derive;
extern crate rustc_hex;
extern crate stats;
extern crate stop_guard;
extern crate time;
extern crate using_queue;
extern crate table;

View File

@ -31,6 +31,7 @@ use miner::Miner;
use snapshot::{ManifestData, RestorationStatus};
use snapshot::service::{Service as SnapshotService, ServiceParams as SnapServiceParams};
use ansi_term::Colour;
use stop_guard::StopGuard;
/// Message type for external and internal events
#[derive(Clone, PartialEq, Eq, Debug)]
@ -59,7 +60,7 @@ pub struct ClientService {
client: Arc<Client>,
snapshot: Arc<SnapshotService>,
database: Arc<Database>,
_stop_guard: ::devtools::StopGuard,
_stop_guard: StopGuard,
}
impl ClientService {
@ -111,7 +112,7 @@ impl ClientService {
spec.engine.register_client(Arc::downgrade(&client) as _);
let stop_guard = ::devtools::StopGuard::new();
let stop_guard = StopGuard::new();
Ok(ClientService {
io_service: Arc::new(io_service),

View File

@ -0,0 +1,6 @@
[package]
name = "stop-guard"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
[dependencies]