Remove dead code guards in BiomeRestResouceManager
Replace with biome-rest-api feature guard
@@ -130,15 +130,12 @@ use crate::rest_api::sessions::AccessTokenIssuer;
/// * `GET /biome/user/{id}` - Retrieve user with specified ID
/// * `DELETE /biome/user/{id}` - Remove user with specified ID
pub struct BiomeRestResourceManager {
- // Disable lint warning, for now this is only used if the biome-credentials feature is enabled
- #[allow(dead_code)]
+ #[cfg(feature = "biome-rest-api")]
user_store: DieselUserStore,
#[cfg(all(feature = "biome-key-management", feature = "json-web-tokens"))]
key_store: Arc<PostgresKeyStore>,
- // Disable lint warning, for now this is only used if the biome-credentials feature is enabled
- #[allow(dead_code)]
+ #[cfg(feature = "biome-rest-api")]
rest_config: Arc<BiomeRestConfig>,
- #[allow(dead_code)]
#[cfg(feature = "json-web-tokens")]
token_secret_manager: Arc<dyn SecretManager>,
#[cfg(all(feature = "json-web-tokens", feature = "biome-refresh-tokens"))]
@@ -149,6 +146,7 @@ pub struct BiomeRestResourceManager {
credentials_store: Option<Arc<SplinterCredentialsStore>>,
}
+#[cfg(feature = "biome-rest-api")]
impl RestResourceProvider for BiomeRestResourceManager {
fn resources(&self) -> Vec<Resource> {
// This needs to be mutable if biome-credentials feature is enable
