From 9932d26c4d278c3cab5f4800c3a56dd6243f7718 Mon Sep 17 00:00:00 2001 From: Cheng JIANG Date: Mon, 11 May 2020 10:02:29 +0200 Subject: [PATCH] fix logging feature && bump version --- Cargo.toml | 2 +- README.md | 2 +- src/internal_api.rs | 12 ++---------- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3b765041..13257fc2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "casbin" -version = "0.7.5" +version = "0.7.6" authors = ["Joey ", "Cheng JIANG "] edition = "2018" license = "Apache-2.0" diff --git a/README.md b/README.md index 6ddb7685..230c321e 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Add this package to `Cargo.toml` of your project. (Check https://crates.io/crate ```toml [dependencies] -casbin = { version = "0.7.5", default-features = false, features = ["runtime-async-std", "logging"] } +casbin = { version = "0.7.6", default-features = false, features = ["runtime-async-std", "logging"] } async-std = { version = "1.5.0", features = ["attributes"] } env_logger = "0.7.1" ``` diff --git a/src/internal_api.rs b/src/internal_api.rs index 95dfd47a..5fb6e843 100644 --- a/src/internal_api.rs +++ b/src/internal_api.rs @@ -370,16 +370,8 @@ impl InternalApi for Enforcer { #[cfg(any(feature = "watcher", feature = "logging"))] { - let event_data = EventData::RemoveFilteredPolicy(sec.to_owned(), ptype.to_owned(), { - #[cfg(feature = "incremental")] - { - rules.clone() - } - #[cfg(not(feature = "incremental"))] - { - rules - } - }); + let event_data = + EventData::RemoveFilteredPolicy(sec.to_owned(), ptype.to_owned(), rules.clone()); #[cfg(feature = "watcher")] { if rules_removed && self.has_auto_notify_watcher_enabled() {