From 1db5caf6bb46aa44a7d2a76c8bd15ef19727281d Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Thu, 5 Sep 2019 15:29:32 +0200 Subject: [PATCH] Make regex a feature of this crate, passed through to env_logger This allows to deactivate the feature if wanted. env_logger comes with several optional-but-default-activated features, including a dependency on regex. Not everyone likes to pull in regex. Putting this behind a feature allows users of android_logger to use it with default-features=false and thus removing the regex dependency. --- Cargo.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 5accb92..3c40eb1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,10 @@ A logging implementation for `log` which hooks to android log output. keywords = ["android", "bindings", "log", "logger"] categories = ["api-bindings"] +[features] +default = ["regex"] +regex = ["env_logger/regex"] + [dependencies] lazy_static = "1.0" @@ -22,6 +26,7 @@ version = "0.1" [dependencies.env_logger] version = "0.6" +default-features = false [badges] travis-ci = { repository = "Nercury/android_logger-rs" }