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

feat: fix use code to adapt to latest Rust version #325

Merged
merged 6 commits into from
Feb 2, 2024

Conversation

codeironman
Copy link
Contributor

@codeironman codeironman commented Feb 2, 2024

Solve the problem of reimported
fix: casbin-rs/yaml-adapter#6

@CLAassistant
Copy link

CLAassistant commented Feb 2, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ hsluoyz
❌ caofengyi


caofengyi seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

github-actions bot commented Feb 2, 2024

Benchmark for 7a6bedb

Click to view benchmark
Test PR Benchmark Master Benchmark %
b_benchmark_rbac_model_large 9.8±0.17ms 9.7±0.18ms +1.03%
benchmark priority model 4.8±0.10µs 4.8±0.11µs 0.00%
benchmark_abac_model 2.5±0.04µs 2.5±0.02µs 0.00%
benchmark_basic_model 4.2±0.09µs 4.1±0.05µs +2.44%
benchmark_key_match 7.7±0.13µs 7.7±0.10µs 0.00%
benchmark_raw 0.0±0.00ns 0.0±0.00ns NaN%
benchmark_rbac_model 6.7±0.13µs 6.5±0.10µs +3.08%
benchmark_rbac_model_medium 790.4±11.05µs 791.1±13.06µs -0.09%
benchmark_rbac_model_with_domains 6.7±0.05µs 6.7±0.11µs 0.00%
benchmark_rbac_with_deny 9.2±0.13µs 9.2±0.17µs 0.00%
benchmark_rbac_with_resource_roles 4.8±0.08µs 4.8±0.06µs 0.00%
benchmark_role_manager_large 4.6±0.06ms 4.6±0.03ms 0.00%
benchmark_role_manager_medium 309.6±6.30µs 315.5±4.59µs -1.87%
benchmark_role_manager_small 85.8±1.64µs 86.2±0.99µs -0.46%

Copy link

github-actions bot commented Feb 2, 2024

Benchmark for 7a6bedb

Click to view benchmark
Test PR Benchmark Master Benchmark %
b_benchmark_rbac_model_large 10.1±0.05ms 9.8±0.06ms +3.06%
benchmark priority model 4.9±0.07µs 4.8±0.10µs +2.08%
benchmark_abac_model 2.5±0.04µs 2.5±0.02µs 0.00%
benchmark_basic_model 4.3±0.08µs 4.2±0.26µs +2.38%
benchmark_key_match 7.9±0.15µs 8.0±0.13µs -1.25%
benchmark_raw 0.0±0.00ns 0.0±0.00ns NaN%
benchmark_rbac_model 6.9±0.05µs 6.9±0.09µs 0.00%
benchmark_rbac_model_medium 851.3±8.99µs 831.3±11.63µs +2.41%
benchmark_rbac_model_with_domains 6.9±0.11µs 6.9±0.38µs 0.00%
benchmark_rbac_with_deny 9.5±0.32µs 9.2±0.32µs +3.26%
benchmark_rbac_with_resource_roles 4.9±0.18µs 5.1±0.09µs -3.92%
benchmark_role_manager_large 4.7±0.03ms 4.7±0.02ms 0.00%
benchmark_role_manager_medium 317.3±3.78µs 319.5±13.59µs -0.69%
benchmark_role_manager_small 89.9±4.32µs 89.2±5.54µs +0.78%

Copy link

github-actions bot commented Feb 2, 2024

Benchmark for 7a6bedb

Click to view benchmark
Test PR Benchmark Master Benchmark %
b_benchmark_rbac_model_large 10.2±0.16ms 10.0±0.11ms +2.00%
benchmark priority model 4.7±0.07µs 4.6±0.09µs +2.17%
benchmark_abac_model 2.5±0.02µs 2.5±0.04µs 0.00%
benchmark_basic_model 4.3±0.11µs 4.1±0.06µs +4.88%
benchmark_key_match 7.8±0.13µs 7.9±0.10µs -1.27%
benchmark_raw 0.0±0.00ns 0.0±0.00ns NaN%
benchmark_rbac_model 6.7±0.09µs 6.9±0.07µs -2.90%
benchmark_rbac_model_medium 849.5±8.43µs 835.2±8.89µs +1.71%
benchmark_rbac_model_with_domains 6.8±0.13µs 6.6±0.11µs +3.03%
benchmark_rbac_with_deny 9.4±0.15µs 9.5±0.11µs -1.05%
benchmark_rbac_with_resource_roles 4.9±0.12µs 4.8±0.08µs +2.08%
benchmark_role_manager_large 4.6±0.02ms 4.6±0.02ms 0.00%
benchmark_role_manager_medium 317.0±5.18µs 312.4±3.88µs +1.47%
benchmark_role_manager_small 88.2±1.32µs 86.8±1.18µs +1.61%

Copy link

codecov bot commented Feb 2, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (7a6bedb) 64.11% compared to head (34c5a62) 64.11%.

Files Patch % Lines
src/adapter/file_adapter.rs 57.14% 3 Missing ⚠️
src/config.rs 70.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #325      +/-   ##
==========================================
- Coverage   64.11%   64.11%   -0.01%     
==========================================
  Files          24       24              
  Lines        1881     1878       -3     
==========================================
- Hits         1206     1204       -2     
+ Misses        675      674       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Feb 2, 2024

Benchmark for 7a6bedb

Click to view benchmark
Test PR Benchmark Master Benchmark %
b_benchmark_rbac_model_large 10.2±0.03ms 9.8±0.09ms +4.08%
benchmark priority model 4.6±0.06µs 4.7±0.09µs -2.13%
benchmark_abac_model 2.8±0.04µs 2.6±0.04µs +7.69%
benchmark_basic_model 4.2±0.06µs 4.3±0.07µs -2.33%
benchmark_key_match 7.9±0.11µs 7.9±0.19µs 0.00%
benchmark_raw 0.0±0.00ns 0.0±0.00ns NaN%
benchmark_rbac_model 7.0±0.14µs 6.9±0.12µs +1.45%
benchmark_rbac_model_medium 889.8±19.28µs 807.9±10.91µs +10.14%
benchmark_rbac_model_with_domains 6.6±0.11µs 6.8±0.07µs -2.94%
benchmark_rbac_with_deny 9.5±0.17µs 9.4±0.12µs +1.06%
benchmark_rbac_with_resource_roles 4.8±0.05µs 4.9±0.10µs -2.04%
benchmark_role_manager_large 4.8±0.09ms 4.7±0.01ms +2.13%
benchmark_role_manager_medium 338.8±5.33µs 323.8±14.47µs +4.63%
benchmark_role_manager_small 94.2±1.50µs 88.2±1.23µs +6.80%

Copy link

github-actions bot commented Feb 2, 2024

Benchmark for 7a6bedb

Click to view benchmark
Test PR Benchmark Master Benchmark %
b_benchmark_rbac_model_large 10.0±0.17ms 10.2±0.07ms -1.96%
benchmark priority model 4.9±0.05µs 4.8±0.07µs +2.08%
benchmark_abac_model 2.6±0.16µs 2.6±0.14µs 0.00%
benchmark_basic_model 4.3±0.07µs 4.4±0.07µs -2.27%
benchmark_key_match 8.3±0.16µs 7.8±0.07µs +6.41%
benchmark_raw 0.0±0.00ns 0.0±0.00ns NaN%
benchmark_rbac_model 7.1±0.12µs 7.0±0.12µs +1.43%
benchmark_rbac_model_medium 853.0±6.81µs 824.1±6.22µs +3.51%
benchmark_rbac_model_with_domains 6.9±0.13µs 6.9±0.23µs 0.00%
benchmark_rbac_with_deny 9.6±0.16µs 9.4±0.08µs +2.13%
benchmark_rbac_with_resource_roles 5.0±0.10µs 4.9±0.05µs +2.04%
benchmark_role_manager_large 4.6±0.19ms 4.6±0.01ms 0.00%
benchmark_role_manager_medium 317.9±6.86µs 324.0±5.53µs -1.88%
benchmark_role_manager_small 89.1±1.56µs 90.1±3.16µs -1.11%

@hsluoyz hsluoyz changed the title Fix: #6 feat: fix use code to adapt to latest Rust version Feb 2, 2024
@hsluoyz hsluoyz merged commit 1dd39a0 into casbin:master Feb 2, 2024
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants