From eee65199f8b9a94ba8551425535ca3b0e4f73187 Mon Sep 17 00:00:00 2001 From: James Spencer Date: Thu, 25 Apr 2024 12:45:45 +1000 Subject: [PATCH] Remove unused &mut self in key constraint extension parsing Signed-off-by: James Spencer --- examples/key_storage.rs | 2 +- src/proto/message.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/key_storage.rs b/examples/key_storage.rs index cf19fe4..4a636ec 100644 --- a/examples/key_storage.rs +++ b/examples/key_storage.rs @@ -151,7 +151,7 @@ impl Session for KeyStorage { } = identity; info!("Would use these constraints: {constraints:#?}"); for constraint in constraints { - if let KeyConstraint::Extension(mut extension) = constraint { + if let KeyConstraint::Extension(extension) = constraint { if let Some(destination) = extension.parse_key_constraint::()? { diff --git a/src/proto/message.rs b/src/proto/message.rs index 9c3b754..a443b4e 100644 --- a/src/proto/message.rs +++ b/src/proto/message.rs @@ -589,9 +589,7 @@ impl Extension { /// If there is a mismatch between the extension name /// and the [`KeyConstraintExtension::NAME`], this method /// will return [`None`] - pub fn parse_key_constraint( - &mut self, - ) -> std::result::Result, ::Error> + pub fn parse_key_constraint(&self) -> std::result::Result, ::Error> where T: KeyConstraintExtension + Decode, {