Skip to content

Commit

Permalink
Merge pull request #269 from PsiACE/bump-deps
Browse files Browse the repository at this point in the history
build(deps): update ip_network and rhai
  • Loading branch information
hackerchai authored Jul 18, 2021
2 parents 613a74a + 719ea49 commit 259fbb6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ async-std = { version = "1.9.0", optional = true }
async-trait = "0.1.48"
globset = { version = "0.4.6", optional = true }
ritelinked = { version = "0.3.0", default-features = false, features = ["ahash", "inline-more"] }
ip_network = { version = "0.3.4", optional = true }
ip_network = { version = "0.4.0", optional = true }
lazy_static = "1.4.0"
lru = { version = "0.6.5", optional = true }
parking_lot = "0.11"
regex = "1.4.5"
rhai = { version = "0.20.0", features = [
rhai = { version = "1.0.0", features = [
"sync",
"only_i32",
"no_function",
Expand Down
8 changes: 3 additions & 5 deletions src/rbac/default_role_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl DefaultRoleManager {
.filter(|x| Some(x.as_str()) != domain)
{
for direct_role in
&self.create_role(name, Some(&domain)).read().roles
&self.create_role(name, Some(domain)).read().roles
{
cloned_role.add_role(Arc::clone(direct_role));
}
Expand Down Expand Up @@ -287,10 +287,8 @@ impl Role {
}

fn add_role(&mut self, other_role: Arc<RwLock<Role>>) -> bool {
let not_exists = !self
.roles
.iter()
.any(|role| Arc::ptr_eq(&role, &other_role));
let not_exists =
!self.roles.iter().any(|role| Arc::ptr_eq(role, &other_role));

if not_exists {
self.roles.push(other_role);
Expand Down
2 changes: 1 addition & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ lazy_static! {
}

pub fn escape_assertion(s: &str) -> String {
ESC_A.replace_all(&s, "${1}_").to_string()
ESC_A.replace_all(s, "${1}_").to_string()
}

pub fn remove_comment(s: &str) -> String {
Expand Down

0 comments on commit 259fbb6

Please sign in to comment.