aboutsummaryrefslogtreecommitdiff
path: root/src/logbag.rs
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2021-03-06 12:56:09 +0100
committerDaniel Schadt <kingdread@gmx.de>2021-03-06 12:56:09 +0100
commit15e573150547f956956b7c58c752e31184253fbd (patch)
treec986211e9a9b8758c85f0461b208679c28a1181b /src/logbag.rs
parent9079d9ec37bfd4293347539155f1164a979379be (diff)
downloadezau-15e573150547f956956b7c58c752e31184253fbd.tar.gz
ezau-15e573150547f956956b7c58c752e31184253fbd.tar.bz2
ezau-15e573150547f956956b7c58c752e31184253fbd.zip
put matrix & discord functionality behind gates
serenity and matrix-sdk pull in quite a lot of dependencies, which for a minimal use of ezau might not be wanted. Therefore, we now disable those parts by default, and the user has to opt-in into building ezau with Discord or Matrix functionality.
Diffstat (limited to 'src/logbag.rs')
-rw-r--r--src/logbag.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/logbag.rs b/src/logbag.rs
index f94b80a..362bee5 100644
--- a/src/logbag.rs
+++ b/src/logbag.rs
@@ -14,15 +14,16 @@ pub struct LogBag {
data: Vec<(String, Vec<String>)>,
}
+// Conditional compilation makes it hard to really use all the code, so we just allow dead code
+// here locally.
+#[allow(dead_code)]
impl LogBag {
/// Construct a new, empty [`LogBag`].
- #[cfg(test)]
pub fn new() -> Self {
LogBag { data: Vec::new() }
}
/// Return an iterator over all available categories.
- #[cfg(test)]
pub fn categories(&self) -> impl Iterator<Item = &str> {
self.data.iter().map(|x| &x.0 as &str)
}