Coding style
This commit is contained in:
parent
cbb5742ac3
commit
abb6947853
33 changed files with 79 additions and 151 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue