[pbs-devel] [PATCH backup v2 6/6] tools: add missing cfg(test) macro
Maximiliano Sandoval
m.sandoval at proxmox.com
Wed Jun 26 15:06:03 CEST 2024
Fixes the rustc warning:
warning: struct `TestAsyncCacher` is never constructed
--> pbs-tools/src/async_lru_cache.rs:86:12
|
86 | struct TestAsyncCacher {
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
pbs-tools/src/async_lru_cache.rs | 1 +
1 file changed, 1 insertion(+)
diff --git a/pbs-tools/src/async_lru_cache.rs b/pbs-tools/src/async_lru_cache.rs
index 1f023d34..c43b8771 100644
--- a/pbs-tools/src/async_lru_cache.rs
+++ b/pbs-tools/src/async_lru_cache.rs
@@ -80,6 +80,7 @@ impl<K: std::cmp::Eq + std::hash::Hash + Copy, V: Clone + Send + 'static> AsyncL
}
}
+#[cfg(test)]
mod test {
use super::*;
--
2.39.2
More information about the pbs-devel
mailing list