Ensure tests work correctly when no features enabled
This commit is contained in:
parent
33cbe6528f
commit
86f768e996
2 changed files with 6 additions and 0 deletions
|
@ -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!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue