Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix wrong cap range in push_index_if_explain marco #370

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

liulifox233
Copy link
Contributor

  • src/macros.rs: Changed the condition in the push_index_if_explain macro from checking if cap is greater than 1 to checking if cap is greater than 0.

Copy link

github-actions bot commented Feb 4, 2025

Benchmark for b43e2c9

Click to view benchmark
Test PR Benchmark Master Benchmark %
b_benchmark_rbac_model_large 10.0±0.05ms 10.0±0.12ms 0.00%
benchmark priority model 4.2±0.03µs 4.1±0.06µs +2.44%
benchmark_abac_model 2.4±0.05µs 2.5±0.04µs -4.00%
benchmark_basic_model 3.8±0.08µs 3.8±0.06µs 0.00%
benchmark_key_match 6.7±0.05µs 6.9±0.13µs -2.90%
benchmark_raw 0.0±0.00ns 0.0±0.00ns NaN%
benchmark_rbac_model 6.1±0.08µs 6.2±0.06µs -1.61%
benchmark_rbac_model_medium 833.7±7.31µs 831.3±6.02µs +0.29%
benchmark_rbac_model_with_domains 5.8±0.07µs 5.8±0.09µs 0.00%
benchmark_rbac_with_deny 8.6±0.12µs 8.6±0.11µs 0.00%
benchmark_rbac_with_resource_roles 4.3±0.08µs 4.4±0.13µs -2.27%
benchmark_role_manager_large 4.6±0.02ms 4.6±0.03ms 0.00%
benchmark_role_manager_medium 303.4±5.20µs 299.0±2.76µs +1.47%
benchmark_role_manager_small 28.6±0.29µs 28.6±0.41µs 0.00%

@hsluoyz hsluoyz merged commit 89f9467 into casbin:master Feb 4, 2025
10 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 4, 2025
## [2.10.1](v2.10.0...v2.10.1) (2025-02-04)

### Bug Fixes

* fix wrong range in push_index_if_explain marco ([#370](#370)) ([89f9467](89f9467))
Copy link

github-actions bot commented Feb 4, 2025

🎉 This PR is included in version 2.10.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants