diff options
author | Daniel Schadt <kingdread@gmx.de> | 2021-03-06 12:29:07 +0100 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2021-03-06 12:29:07 +0100 |
commit | d137fa5429c13a98ebcf6ec9a00ae1d12ee6f97e (patch) | |
tree | 4ab483c2560703d7b0e988064a728d708c5a4063 /src | |
parent | 85ed8053e5fd20902e156a120dadd3f418d52a1e (diff) | |
download | ezau-d137fa5429c13a98ebcf6ec9a00ae1d12ee6f97e.tar.gz ezau-d137fa5429c13a98ebcf6ec9a00ae1d12ee6f97e.tar.bz2 ezau-d137fa5429c13a98ebcf6ec9a00ae1d12ee6f97e.zip |
only compile LogBag::{new,categories} in tests
Those functions are not used anywhere else and just produce dead code
warnings.
Diffstat (limited to 'src')
-rw-r--r-- | src/logbag.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/logbag.rs b/src/logbag.rs index 6575ecd..f94b80a 100644 --- a/src/logbag.rs +++ b/src/logbag.rs @@ -16,11 +16,13 @@ pub struct LogBag { 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) } |