Browse Source

Fix clippy errors in open invite protocol

onyinyang 2 months ago
parent
commit
f26db1372a
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/proto/open_invite.rs

+ 3 - 3
src/proto/open_invite.rs

@@ -76,13 +76,13 @@ impl BridgeAuth {
             };
         }
         // Check if verifying with the old key succeeded, if it did, check if it has been seen
-        if old_token.is_some() {
+        if let Some(token) = old_token {
             // Only proceed if the invite_id is fresh
-            (invite_id, bucket_id) = old_token.unwrap().0;
+            (invite_id, bucket_id) = token.0;
             if self
                 .old_filters
                 .openinv_filter
-                .get_mut(old_token.unwrap().1)
+                .get_mut(token.1)
                 .unwrap()
                 .filter(&invite_id)
                 == SeenType::Seen