Skip to content

Commit

Permalink
Fix: missing incremental feature gate
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheng JIANG committed May 10, 2020
1 parent b82b00c commit f43bb84
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "casbin"
version = "0.7.3"
version = "0.7.4"
authors = ["Joey <[email protected]>", "Cheng JIANG <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
Expand All @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
```
Expand Down
1 change: 1 addition & 0 deletions src/cached_enforcer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

1 comment on commit f43bb84

@GopherJ
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rust Benchmark

Benchmark suite Current: f43bb84 Previous: b82b00c Ratio
b_benchmark_abac_model 7296 ns/iter (± 734) 7493 ns/iter (± 866) 0.97
b_benchmark_basic_model 7619 ns/iter (± 486) 7415 ns/iter (± 899) 1.03
b_benchmark_key_match 26698 ns/iter (± 1130) 26861 ns/iter (± 3771) 0.99
b_benchmark_priority_model 9119 ns/iter (± 670) 9341 ns/iter (± 1117) 0.98
b_benchmark_raw 8 ns/iter (± 0) 8 ns/iter (± 1) 1
b_benchmark_rbac_model 22340 ns/iter (± 2439) 21547 ns/iter (± 2872) 1.04
b_benchmark_rbac_model_large 71028620 ns/iter (± 4060730) 66732802 ns/iter (± 7803896) 1.06
b_benchmark_rbac_model_medium 6731653 ns/iter (± 524153) 6448345 ns/iter (± 697954) 1.04
b_benchmark_rbac_model_small 662061 ns/iter (± 35882) 630145 ns/iter (± 62871) 1.05
b_benchmark_rbac_model_with_domains 12793 ns/iter (± 867) 12435 ns/iter (± 1477) 1.03
b_benchmark_rbac_with_deny 37453 ns/iter (± 1646) 36754 ns/iter (± 3428) 1.02
b_benchmark_rbac_with_resource_roles 10015 ns/iter (± 515) 9664 ns/iter (± 1007) 1.04

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.