Skip to content

Commit

Permalink
remove useless mut in set_namespaces (#25)
Browse files Browse the repository at this point in the history
Co-authored-by: Olivier <olivier@helitech>
  • Loading branch information
oroulet and Olivier authored Jan 8, 2025
1 parent 7efff22 commit c5c3618
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions opcua-client/src/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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<NamespaceMap, Error> {
pub async fn read_namespace_array(&self) -> Result<NamespaceMap, Error> {
let nodeid: NodeId = VariableId::Server_NamespaceArray.into();
let result = self
.read(
Expand Down

0 comments on commit c5c3618

Please sign in to comment.