|
|
@ -10,11 +10,11 @@ pub struct Cron<'r, C, U, R> { |
|
|
|
command_runner: &'r R,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'r, U, R> Cron<'r, Box<str>, U, R> {
|
|
|
|
impl<'r, U, R> Cron<'r, Box<[u8]>, U, R> {
|
|
|
|
pub fn new<C: AsRef<str>>(user: U, content: C, command_runner: &'r R) -> Self {
|
|
|
|
Self {
|
|
|
|
user,
|
|
|
|
content: (String::from(content.as_ref()) + "\n").into(),
|
|
|
|
content: (String::from(content.as_ref()) + "\n").as_bytes().into(),
|
|
|
|
command_runner,
|
|
|
|
}
|
|
|
|
}
|
|
|
|