Skip to content

Commit

Permalink
if let
Browse files Browse the repository at this point in the history
  • Loading branch information
bifurcation authored and germ-mark committed Dec 11, 2024
1 parent f998efc commit 789b5d9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions mls-rs/src/group/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2028,13 +2028,14 @@ where

// If the current leaf node contains an epoch value, delete any cached state for
// updates from prior epochs.
self.current_user_leaf_node()?
let epoch_ext = self
.current_user_leaf_node()?
.extensions
.get_as::<LeafNodeEpochExt>()?
.map(|epoch_ext| {
self.pending_updates
.retain(|_pk, upd| upd.epoch >= epoch_ext.epoch);
});
.get_as::<LeafNodeEpochExt>()?;
if let Some(epoch_ext) = epoch_ext {
self.pending_updates
.retain(|_pk, upd| upd.epoch >= epoch_ext.epoch);
}
}

self.pending_commit = None;
Expand Down

0 comments on commit 789b5d9

Please sign in to comment.