Update
This commit is contained in:
parent
44ea23c1b5
commit
34f8dbffab
8 changed files with 78 additions and 50 deletions
|
|
@ -43,7 +43,7 @@ impl<E: Error> fmt::Display for NginxServerError<E> {
|
|||
|
||||
pub struct NginxServer<'a, C: 'a + CommandRunner, T> where T: Deref<Target=str> {
|
||||
command_runner: &'a C,
|
||||
file: FileSymbol<T, Cow<'a, str>>,
|
||||
file: FileSymbol<T, String>,
|
||||
}
|
||||
|
||||
use std::borrow::Cow;
|
||||
|
|
@ -121,7 +121,7 @@ location @proxy {{
|
|||
}
|
||||
|
||||
pub fn new(domain: &'a str, content: String, command_runner: &'a C) -> Self {
|
||||
let file_path: Cow<str> = Cow::from(String::from("/etc/nginx/sites-enabled/") + domain);
|
||||
let file_path = String::from("/etc/nginx/sites-enabled/") + domain;
|
||||
NginxServer {
|
||||
command_runner: command_runner,
|
||||
file: FileSymbol::new(file_path, content)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue