Simplify cron a tiny bit

This commit is contained in:
Adrian Heine 2019-12-06 21:18:28 +01:00
parent eb6b05c9db
commit 51b47b5dd4

View file

@ -25,8 +25,8 @@ impl<C: AsRef<str>, U: AsRef<str>, R: CommandRunner> Symbol for Cron<'_, C, U, R
fn target_reached(&self) -> Result<bool, Box<dyn Error>> {
let tab = self
.command_runner
.get_output("crontab", args!["-l", "-u", self.user.as_ref(),])?;
Ok(tab == self.content.as_ref().bytes().collect::<Vec<u8>>())
.get_output("crontab", args!["-l", "-u", self.user.as_ref()])?;
Ok(tab == self.content.as_ref().as_bytes())
}
fn execute(&self) -> Result<(), Box<dyn Error>> {