Skip to content

Commit 7472903

Browse files
authored
Merge pull request #59 from wiktor-k/jcspencer/unused-mut-key-constraint
Remove unused `&mut self` in key constraint extension parsing
2 parents 698b416 + eee6519 commit 7472903

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

examples/key_storage.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ impl Session for KeyStorage {
151151
} = identity;
152152
info!("Would use these constraints: {constraints:#?}");
153153
for constraint in constraints {
154-
if let KeyConstraint::Extension(mut extension) = constraint {
154+
if let KeyConstraint::Extension(extension) = constraint {
155155
if let Some(destination) =
156156
extension.parse_key_constraint::<RestrictDestination>()?
157157
{

src/proto/message.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -589,9 +589,7 @@ impl Extension {
589589
/// If there is a mismatch between the extension name
590590
/// and the [`KeyConstraintExtension::NAME`], this method
591591
/// will return [`None`]
592-
pub fn parse_key_constraint<T>(
593-
&mut self,
594-
) -> std::result::Result<Option<T>, <T as Decode>::Error>
592+
pub fn parse_key_constraint<T>(&self) -> std::result::Result<Option<T>, <T as Decode>::Error>
595593
where
596594
T: KeyConstraintExtension + Decode,
597595
{

0 commit comments

Comments
 (0)