Browse Source

Simplify cron a tiny bit

master
Adrian Heine 5 years ago
parent
commit
51b47b5dd4
  1. 4
      src/symbols/cron.rs

4
src/symbols/cron.rs

@ -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>> { fn target_reached(&self) -> Result<bool, Box<dyn Error>> {
let tab = self let tab = self
.command_runner .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>> { fn execute(&self) -> Result<(), Box<dyn Error>> {

Loading…
Cancel
Save