Coding style

This commit is contained in:
Adrian Heine 2019-03-01 18:47:47 +01:00
parent cbb5742ac3
commit abb6947853
33 changed files with 79 additions and 151 deletions

View file

@ -23,13 +23,13 @@ impl From<io::Error> for NginxServerError<io::Error> {
impl<E: Error> Error for NginxServerError<E> {
fn description(&self) -> &str {
match self {
&NginxServerError::ExecError(ref e) => e.description(),
&NginxServerError::GenericError => "Generic error"
NginxServerError::ExecError(ref e) => e.description(),
NginxServerError::GenericError => "Generic error"
}
}
fn cause(&self) -> Option<&Error> {
match self {
&NginxServerError::ExecError(ref e) => Some(e),
NginxServerError::ExecError(ref e) => Some(e),
_ => None
}
}
@ -123,7 +123,7 @@ location @proxy {{
pub fn new(domain: &'a str, content: String, command_runner: &'a C) -> Self {
let file_path = String::from("/etc/nginx/sites-enabled/") + domain;
NginxServer {
command_runner: command_runner,
command_runner,
file: FileSymbol::new(file_path, content)
}
}