Merge branch 'master' into main-refactor

Conflicts:
	parity/main.rs
This commit is contained in:
Tomasz Drwięga
2016-04-21 17:35:54 +02:00
9 changed files with 20 additions and 11 deletions

View File

@@ -18,6 +18,7 @@
// while not included in binary
#![allow(dead_code)]
#![cfg_attr(feature="dev", allow(used_underscore_binding))]
pub mod service;
@@ -41,6 +42,12 @@ pub struct Hypervisor {
processes: RwLock<HashMap<BinaryId, Child>>,
}
impl Default for Hypervisor {
fn default() -> Self {
Hypervisor::new()
}
}
impl Hypervisor {
/// initializes the Hypervisor service with the open ipc socket for incoming clients
pub fn new() -> Hypervisor {

View File

@@ -21,6 +21,7 @@ use std::collections::*;
use std::fs::{File, create_dir_all};
use std::env;
use std::io::{Read, Write};
use std::path::PathBuf;
#[cfg_attr(feature="dev", allow(enum_variant_names))]
#[derive(Debug)]
@@ -99,7 +100,7 @@ fn with_locked_version<F>(db_path: Option<&str>, script: F) -> Result<usize, Err
let mut path = env::home_dir().expect("Applications should have a home dir");
path.push(".parity");
path
}, |s| ::std::path::PathBuf::from(s));
}, PathBuf::from);
try!(create_dir_all(&path).map_err(|_| Error::CannotCreateConfigPath));
path.push("ver.lock");