Skip to content

Commit

Permalink
remove more useless mut arg declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier committed Jan 8, 2025
1 parent c5c3618 commit 7fc6a17
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 @@ -463,13 +463,13 @@ impl Session {
}

/// Return index of supplied namespace url from cache
pub fn get_namespace_index_from_cache(&mut self, url: &str) -> Option<u16> {
pub fn get_namespace_index_from_cache(&self, url: &str) -> Option<u16> {
self.encoding_context.read().namespaces().get_index(url)
}

/// Return index of supplied namespace url
/// by first looking at namespace cache and querying server if necessary
pub async fn get_namespace_index(&mut self, url: &str) -> Result<u16, Error> {
pub async fn get_namespace_index(&self, url: &str) -> Result<u16, Error> {
if let Some(idx) = self.get_namespace_index_from_cache(url) {
return Ok(idx);
};
Expand Down

0 comments on commit 7fc6a17

Please sign in to comment.