Fixing warnings
This commit is contained in:
@@ -41,6 +41,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 {
|
||||
@@ -116,6 +122,7 @@ impl Hypervisor {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use std::sync::atomic::{AtomicBool,Ordering};
|
||||
|
||||
@@ -301,7 +301,7 @@ fn setup_log(init: &Option<String>) -> Arc<RotatingLogger> {
|
||||
}
|
||||
|
||||
let logs = Arc::new(RotatingLogger::new(levels));
|
||||
let log2 = logs.clone();
|
||||
let logger = logs.clone();
|
||||
let format = move |record: &LogRecord| {
|
||||
let timestamp = time::strftime("%Y-%m-%d %H:%M:%S %Z", &time::now()).unwrap();
|
||||
let format = if max_log_level() <= LogLevelFilter::Info {
|
||||
@@ -309,7 +309,7 @@ fn setup_log(init: &Option<String>) -> Arc<RotatingLogger> {
|
||||
} else {
|
||||
format!("{}{}:{}: {}", timestamp, record.level(), record.target(), record.args())
|
||||
};
|
||||
log2.append(format.clone());
|
||||
logger.append(format.clone());
|
||||
format
|
||||
};
|
||||
builder.format(format);
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user