Support marking multiple tasks as done
Not yet exposed via the CLI though
This commit is contained in:
parent
c07d27aa13
commit
ab63261dfd
5 changed files with 32 additions and 25 deletions
|
|
@ -24,8 +24,6 @@ pub enum Error {
|
|||
file2: PathBuf,
|
||||
tz2: String,
|
||||
},
|
||||
#[error("Not a task")]
|
||||
NotATask(Vec<usize>),
|
||||
}
|
||||
|
||||
impl Error {
|
||||
|
|
@ -62,16 +60,6 @@ impl Error {
|
|||
eprintln!(" {:?} has time zone {}", file1, tz1);
|
||||
eprintln!(" {:?} has time zone {}", file2, tz2);
|
||||
}
|
||||
Error::NotATask(numbers) => {
|
||||
if numbers.is_empty() {
|
||||
eprintln!("Not a task.");
|
||||
} else if numbers.len() == 1 {
|
||||
eprintln!("{} is not a task.", numbers[0]);
|
||||
} else {
|
||||
let numbers = numbers.iter().map(|n| n.to_string()).collect::<Vec<_>>();
|
||||
eprintln!("{} are not tasks.", numbers.join(", "));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue