Skip to content

Commit

Permalink
fix logging feature && bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheng JIANG committed May 11, 2020
1 parent 598a9bd commit 9932d26
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "casbin"
version = "0.7.5"
version = "0.7.6"
authors = ["Joey <[email protected]>", "Cheng JIANG <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
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.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"
```
Expand Down
12 changes: 2 additions & 10 deletions src/internal_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

1 comment on commit 9932d26

@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: 9932d26 Previous: 598a9bd Ratio
b_benchmark_abac_model 6143 ns/iter (± 983) 6421 ns/iter (± 1363) 0.96
b_benchmark_basic_model 5965 ns/iter (± 1255) 6693 ns/iter (± 1448) 0.89
b_benchmark_key_match 20185 ns/iter (± 4410) 24267 ns/iter (± 4058) 0.83
b_benchmark_priority_model 8437 ns/iter (± 1596) 7745 ns/iter (± 1304) 1.09
b_benchmark_raw 7 ns/iter (± 2) 7 ns/iter (± 1) 1
b_benchmark_rbac_model 21118 ns/iter (± 5128) 19798 ns/iter (± 3247) 1.07
b_benchmark_rbac_model_large 64145865 ns/iter (± 12196460) 56061649 ns/iter (± 6381520) 1.14
b_benchmark_rbac_model_medium 6331317 ns/iter (± 815518) 5440739 ns/iter (± 911091) 1.16
b_benchmark_rbac_model_small 601976 ns/iter (± 58379) 546371 ns/iter (± 76074) 1.10
b_benchmark_rbac_model_with_domains 12762 ns/iter (± 2115) 11058 ns/iter (± 1914) 1.15
b_benchmark_rbac_with_deny 35346 ns/iter (± 5259) 32953 ns/iter (± 5589) 1.07
b_benchmark_rbac_with_resource_roles 9205 ns/iter (± 1085) 8678 ns/iter (± 1428) 1.06

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

Please sign in to comment.