diff --git a/lib/src/kvs/ds.rs b/lib/src/kvs/ds.rs index 1eb92139..0e285592 100644 --- a/lib/src/kvs/ds.rs +++ b/lib/src/kvs/ds.rs @@ -39,6 +39,7 @@ pub(super) enum Inner { impl fmt::Display for Datastore { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + #![allow(unused_variables)] match &self.inner { #[cfg(feature = "kv-mem")] Inner::Mem(_) => write!(f, "memory"), @@ -50,6 +51,8 @@ impl fmt::Display for Datastore { Inner::TiKV(_) => write!(f, "tikv"), #[cfg(feature = "kv-fdb")] Inner::FDB(_) => write!(f, "fdb"), + #[allow(unreachable_patterns)] + _ => unreachable!(), } } } diff --git a/lib/src/kvs/tx.rs b/lib/src/kvs/tx.rs index f75199e1..c8a82fcb 100644 --- a/lib/src/kvs/tx.rs +++ b/lib/src/kvs/tx.rs @@ -57,6 +57,7 @@ pub(super) enum Inner { impl fmt::Display for Transaction { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + #![allow(unused_variables)] match &self.inner { #[cfg(feature = "kv-mem")] Inner::Mem(_) => write!(f, "memory"), @@ -68,6 +69,8 @@ impl fmt::Display for Transaction { Inner::TiKV(_) => write!(f, "tikv"), #[cfg(feature = "kv-fdb")] Inner::FDB(_) => write!(f, "fdb"), + #[allow(unreachable_patterns)] + _ => unreachable!(), } } }