Skip to content

Commit

Permalink
Merge pull request #59 from wiktor-k/jcspencer/unused-mut-key-constraint
Browse files Browse the repository at this point in the history
Remove unused `&mut self` in key constraint extension parsing
  • Loading branch information
wiktor-k authored Apr 25, 2024
2 parents 698b416 + eee6519 commit 7472903
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/key_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<RestrictDestination>()?
{
Expand Down
4 changes: 1 addition & 3 deletions src/proto/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>(
&mut self,
) -> std::result::Result<Option<T>, <T as Decode>::Error>
pub fn parse_key_constraint<T>(&self) -> std::result::Result<Option<T>, <T as Decode>::Error>
where
T: KeyConstraintExtension + Decode,
{
Expand Down

0 comments on commit 7472903

Please sign in to comment.