From 7aa2dbe1aa9e7286c7045d79fbe390cc217320ec Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Thu, 18 Jul 2024 11:48:49 +0200 Subject: [PATCH] Minor edits --- zenoh/src/net/routing/interceptor/access_control.rs | 2 +- zenoh/src/net/routing/interceptor/authorization.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zenoh/src/net/routing/interceptor/access_control.rs b/zenoh/src/net/routing/interceptor/access_control.rs index 3614fb20ec..a448cf3330 100644 --- a/zenoh/src/net/routing/interceptor/access_control.rs +++ b/zenoh/src/net/routing/interceptor/access_control.rs @@ -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 { diff --git a/zenoh/src/net/routing/interceptor/authorization.rs b/zenoh/src/net/routing/interceptor/authorization.rs index fdcd372e1d..9795388223 100644 --- a/zenoh/src/net/routing/interceptor/authorization.rs +++ b/zenoh/src/net/routing/interceptor/authorization.rs @@ -84,12 +84,12 @@ pub(crate) struct SubjectEntry { #[derive(Debug, Clone)] pub(crate) struct SubjectStore { - // FIXME: This is suboptimal, use `hashbrown::HashTable` inner: Vec, } 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)) } }