aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel <kingdread@gmx.de>2020-06-12 13:44:19 +0200
committerDaniel <kingdread@gmx.de>2020-06-12 13:44:19 +0200
commita8481afdac21b8b846d5fe159678972a879b11c0 (patch)
tree1c7fc5a0c12fdfa474cbb95f0e16f76954b94fd3
parente23af286b81f4c9df0e0ca9d71113caeb909cb0f (diff)
downloadraidgrep-a8481afdac21b8b846d5fe159678972a879b11c0.tar.gz
raidgrep-a8481afdac21b8b846d5fe159678972a879b11c0.tar.bz2
raidgrep-a8481afdac21b8b846d5fe159678972a879b11c0.zip
add a comment about the trait aliases
-rw-r--r--src/fexpr/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fexpr/mod.rs b/src/fexpr/mod.rs
index f765acf..5d12051 100644
--- a/src/fexpr/mod.rs
+++ b/src/fexpr/mod.rs
@@ -11,6 +11,8 @@ use itertools::Itertools;
use lalrpop_util::{lalrpop_mod, lexer::Token, ParseError};
use thiserror::Error;
+// Lalrpop chokes on the associated type specification (it doesn't expect the =), so we need to
+// define those aliases here in Rust and then import and use them in the grammar.
trait DateProducer = filters::values::Producer<Output = chrono::DateTime<chrono::Utc>>;
trait DurationProducer = filters::values::Producer<Output = chrono::Duration>;
trait CountProducer = filters::values::Producer<Output = u8>;