From f43bb8467554026e28b7a519c06c4bc23de58f4d Mon Sep 17 00:00:00 2001 From: Cheng JIANG Date: Sun, 10 May 2020 22:09:36 +0200 Subject: [PATCH] Fix: missing incremental feature gate --- Cargo.toml | 4 ++-- README.md | 2 +- src/cached_enforcer.rs | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8616ef72..a0ad94e1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "casbin" -version = "0.7.3" +version = "0.7.4" authors = ["Joey ", "Cheng JIANG "] edition = "2018" license = "Apache-2.0" @@ -27,7 +27,7 @@ globset = { version = "0.4.5", optional = true } thiserror = "1.0.14" [features] -default = ["runtime-async-std"] +default = ["runtime-async-std", "incremental"] runtime-tokio = ["tokio/fs", "tokio/io-util"] runtime-async-std = ["async-std"] diff --git a/README.md b/README.md index 102e4a19..c22e5f2f 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.3", default-features = false, features = ["runtime-async-std", "logging"] } +casbin = { version = "0.7.4", 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/cached_enforcer.rs b/src/cached_enforcer.rs index af599599..ad0b04a8 100644 --- a/src/cached_enforcer.rs +++ b/src/cached_enforcer.rs @@ -204,6 +204,7 @@ impl CoreApi for CachedEnforcer { self.enforcer.build_role_links() } + #[cfg(feature = "incremental")] #[inline] fn build_incremental_role_links(&mut self, d: EventData) -> Result<()> { self.enforcer.build_incremental_role_links(d)