Remove symbol error type

This commit is contained in:
Adrian Heine 2017-02-07 13:54:06 +01:00
parent 55f2cfae95
commit 4be608a002
10 changed files with 85 additions and 108 deletions

View file

@ -86,8 +86,7 @@ impl<'a> NginxServer<'a, String> {
}
impl<'a, C> Symbol for NginxServer<'a, C> where C: Deref<Target=str> {
type Error = NginxServerError<<FileSymbol<C, Cow<'a, str>> as Symbol>::Error>;
fn target_reached(&self) -> Result<bool, Self::Error> {
fn target_reached(&self) -> Result<bool, Box<Error>> {
if !try!(self.file.target_reached()) {
return Ok(false);
}
@ -95,7 +94,7 @@ impl<'a, C> Symbol for NginxServer<'a, C> where C: Deref<Target=str> {
Ok(true)
}
fn execute(&self) -> Result<(), Self::Error> {
fn execute(&self) -> Result<(), Box<Error>> {
try!(self.file.execute());
try!(self.command_runner.run_with_args("systemctl", &["reload-or-restart", "nginx"]));
Ok(())