Allow elastic feature to be disabled (#529)

This commit is contained in:
Yannik Sander 2022-08-30 10:13:08 +02:00 committed by GitHub
parent b8518f6d48
commit 7d1c1046ba
Failed to generate hash of commit
2 changed files with 7 additions and 1 deletions

View file

@ -27,7 +27,11 @@ sha2 = "0.9"
pandoc = "0.8" pandoc = "0.8"
semver = "1.0" semver = "1.0"
elasticsearch = {git = "https://github.com/elastic/elasticsearch-rs", features = ["rustls-tls"]} elasticsearch = {git = "https://github.com/elastic/elasticsearch-rs", features = ["rustls-tls"], optional = true}
[features]
default = ["elastic"]
elastic = ["elasticsearch"]
[lib] [lib]
name = "flake_info" name = "flake_info"

View file

@ -5,6 +5,8 @@ use data::{import::Kind, Export, Flake, Source};
pub mod commands; pub mod commands;
pub mod data; pub mod data;
#[cfg(feature = "elastic")]
pub mod elastic; pub mod elastic;
pub use commands::get_flake_info; pub use commands::get_flake_info;