Working dummy version

This commit is contained in:
Sam Hedin 2020-06-04 01:13:04 +02:00
parent 83795a3e70
commit 3d15ac076c

View File

@ -40,10 +40,24 @@ pub struct Environment {
impl Environment {
pub fn new() -> Environment {
Environment {
let mut e = Environment {
environment_vars: None,
path_vars: None,
}
};
e.add_nurc();
e
}
pub fn from_config<T: Conf>(configuration: &T) -> Environment {
let env = configuration.env();
let path = configuration.path();
let mut e = Environment {
environment_vars: env,
path_vars: path,
};
e.add_nurc();
e
}
pub fn add_nurc(&mut self) {
@ -56,16 +70,6 @@ impl Environment {
self.add_env(key, value);
}
pub fn from_config<T: Conf>(configuration: &T) -> Environment {
let env = configuration.env();
let path = configuration.path();
Environment {
environment_vars: env,
path_vars: path,
}
}
pub fn morph<T: Conf>(&mut self, configuration: &T) {
self.environment_vars = configuration.env();
self.path_vars = configuration.path();