@@ -123,18 +123,14 @@ where
123 tx.send(job(grammar)).unwrap();
123 tx.send(job(grammar)).unwrap();
128 // TODO: print all failures instead of the first one found.
129 // TODO: print all failures instead of the first one found.
129− if let Some(failure) = rx.try_iter().find_map(|result| result.err()) {
130+ rx.iter()
130− Err(anyhow!(
131+ .find(|result| result.is_err())
131− "Failed to {} some grammar(s).\n{}",
132+ .map(|err| err.with_context(|| format!("Failed to {} some grammar(s)", action)))
132− action,
133+ .unwrap_or(Ok(()))
140fn fetch_grammar(grammar: GrammarConfiguration) -> Result<()> {
136fn fetch_grammar(grammar: GrammarConfiguration) -> Result<()> {