From c5c3618fd231e75322fdb53cddaeb2f87076d936 Mon Sep 17 00:00:00 2001 From: oroulet Date: Wed, 8 Jan 2025 08:13:19 +0100 Subject: [PATCH] remove useless mut in set_namespaces (#25) Co-authored-by: Olivier --- opcua-client/src/session/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opcua-client/src/session/mod.rs b/opcua-client/src/session/mod.rs index d91aea84..1838200b 100644 --- a/opcua-client/src/session/mod.rs +++ b/opcua-client/src/session/mod.rs @@ -399,7 +399,7 @@ impl Session { /// Set the namespace array on the session. /// Make sure that this namespace array contains the base namespace, /// or the session may behave unexpectedly. - pub fn set_namespaces(&mut self, namespaces: NamespaceMap) { + pub fn set_namespaces(&self, namespaces: NamespaceMap) { *self.encoding_context.write().namespaces_mut() = namespaces; } @@ -433,7 +433,7 @@ impl Session { } /// Return namespace array from server and store in namespace cache - pub async fn read_namespace_array(&mut self) -> Result { + pub async fn read_namespace_array(&self) -> Result { let nodeid: NodeId = VariableId::Server_NamespaceArray.into(); let result = self .read(