Skip to content

Commit

Permalink
feat: fix "Rule should start at 2" bug in MemoryAdapter::load_policy() (
Browse files Browse the repository at this point in the history
#360)

* feat: add string adapter

* fix: fix MemoryAdapter::load_policy()
  • Loading branch information
liulifox233 authored Jan 6, 2025
1 parent d01ccdc commit c1d9378
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/adapter/memory_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl Adapter for MemoryAdapter {
for line in self.policy.iter() {
let sec = &line[0];
let ptype = &line[1];
let rule = line[1..].to_vec().clone();
let rule = line[2..].to_vec().clone();

if let Some(t1) = m.get_mut_model().get_mut(sec) {
if let Some(t2) = t1.get_mut(ptype) {
Expand Down

0 comments on commit c1d9378

Please sign in to comment.