diff --git a/src/crontab.rs b/src/crontab.rs index f89ffed..ab24636 100644 --- a/src/crontab.rs +++ b/src/crontab.rs @@ -112,7 +112,7 @@ fn read_crontab(file: &str) -> Result, CronTabError> { let mut jobs: Vec = Vec::new(); for (line_idx, line) in file.split("\n").enumerate() { - let line = line.trim_start(); + let line = line.trim(); if line.is_empty() || line.starts_with("#") { continue; @@ -197,7 +197,7 @@ mod tests { // and added some @alias tests as well. let jobs = read_crontab(concat!( - " 0 5 0 * * * example_daily\n", + " 0 5 0 * * * example_daily \n", " # run at 2:15pm on the first of every month\n", "\n", " 0 15 14 1 * * example_monthly\n",