File tree 1 file changed +14
-7
lines changed 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -101,18 +101,25 @@ impl mls_rs_core::group::GroupStateStorage for GroupStateStorageWrapper {
101
101
{
102
102
let state = Arc :: new ( GroupState {
103
103
id : state. id ( ) ,
104
- data : state. mls_encode_to_vec ( ) . unwrap ( ) ,
104
+ data : state. mls_encode_to_vec ( ) ? ,
105
105
} ) ;
106
106
107
- let epoch_to_record = |v : ET | {
108
- Arc :: new ( EpochRecord {
107
+ let epoch_to_record = |v : ET | -> Result < _ , Self :: Error > {
108
+ Ok ( Arc :: new ( EpochRecord {
109
109
id : v. id ( ) ,
110
- data : v. mls_encode_to_vec ( ) . unwrap ( ) ,
111
- } )
110
+ data : v. mls_encode_to_vec ( ) ? ,
111
+ } ) )
112
112
} ;
113
113
114
- let inserts = epoch_inserts. into_iter ( ) . map ( epoch_to_record) . collect ( ) ;
115
- let updates = epoch_updates. into_iter ( ) . map ( epoch_to_record) . collect ( ) ;
114
+ let inserts = epoch_inserts
115
+ . into_iter ( )
116
+ . map ( epoch_to_record)
117
+ . collect :: < Result < Vec < _ > , _ > > ( ) ?;
118
+
119
+ let updates = epoch_updates
120
+ . into_iter ( )
121
+ . map ( epoch_to_record)
122
+ . collect :: < Result < Vec < _ > , _ > > ( ) ?;
116
123
117
124
self . 0 . write ( state, inserts, updates)
118
125
}
You can’t perform that action at this time.
0 commit comments