AsRef in SetuidCommandRunner

This commit is contained in:
Adrian Heine 2019-10-02 23:36:57 +02:00
parent 8bcd03c7da
commit 466b4cb994
3 changed files with 11 additions and 22 deletions

View file

@ -38,7 +38,7 @@ impl Policy for DefaultPolicy {}
pub struct SymbolFactory<'a, C: 'a + CommandRunner, R: 'a + SymbolRunner, P: 'a + Policy> {
command_runner: &'a C,
acme_command_runner: SetuidCommandRunner<'a, C>,
acme_command_runner: SetuidCommandRunner<'a, Cow<'a, str>, C>,
symbol_runner: &'a R,
policy: &'a P,
}

View file

@ -62,8 +62,8 @@ pub struct UserService<'a, C: AsRef<str>, R: CommandRunner> {
config: FileSymbol<C, PathBuf>,
}
impl<'a, R: CommandRunner> UserService<'a, String, SetuidCommandRunner<'a, R>> {
pub fn new_nodejs<'b: 'a>(
impl<'a, R: CommandRunner> UserService<'a, String, SetuidCommandRunner<'a, Cow<'a, str>, R>> {
pub fn new_nodejs(
home: Cow<'a, Path>,
user_name: Cow<'a, str>,
service_name: &'a str,