Skip to content

Commit

Permalink
Minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzypixelz committed Jul 18, 2024
1 parent 0950450 commit 7aa2dbe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion zenoh/src/net/routing/interceptor/access_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl InterceptorFactoryTrait for AclEnforcer {
}
};

let mut cert_common_names: Vec<_> = Vec::new();
let mut cert_common_names = Vec::new();
let mut username = None;

for auth_id in auth_ids {
Expand Down
2 changes: 1 addition & 1 deletion zenoh/src/net/routing/interceptor/authorization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ pub(crate) struct SubjectEntry {

#[derive(Debug, Clone)]
pub(crate) struct SubjectStore {
// FIXME: This is suboptimal, use `hashbrown::HashTable`
inner: Vec<SubjectEntry>,
}

impl SubjectStore {
pub(crate) fn query(&self, query: &SubjectQuery) -> Option<&SubjectEntry> {
// FIXME: Can this search be better than linear?
self.inner.iter().find(|entry| entry.subject.matches(query))
}
}
Expand Down

0 comments on commit 7aa2dbe

Please sign in to comment.