feat(vfs) Make host_fs and mem_fs mutually exclusives.

This patch generates a compiler error if `host_fs` and `mem_fs` are
both enabled at compile-time. It also generates a compiler error if
none of them have been enabled.
This commit is contained in:
Ivan Enderlin
2021-08-16 15:48:48 +02:00
parent f639dd91f2
commit 52be548680

View File

@@ -6,6 +6,12 @@ use std::path::{Path, PathBuf};
use thiserror::Error;
use tracing::debug;
#[cfg(all(not(feature = "host_fs"), not(feature = "mem_fs")))]
compile_error!("At least the `host_fs` or the `mem_fs` feature must be enabled. Please, pick one.");
#[cfg(all(feature = "host_fs", feature = "mem_fs"))]
compile_error!("The `host_fs` and `mem_fs` features are mutually exclusive.");
#[cfg(feature = "host_fs")]
pub mod host_fs;
//pub mod vfs_fs;