File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -109,13 +109,15 @@ impl SealedTableEntry {
109
109
}
110
110
111
111
let decrypted = async_map_somes ( decryptable_items, |items| cipher. decrypt ( items) ) . await ?;
112
+ let mut chunks_exact = decrypted. chunks_exact ( protected_attributes. len ( ) ) ;
113
+ let mut default_iter =
114
+ std:: iter:: repeat_with :: < & [ Option < Plaintext > ] , _ > ( || & [ ] ) . take ( plaintext_items. len ( ) ) ;
112
115
113
116
let decrypted_iter: & mut dyn Iterator < Item = & [ Option < Plaintext > ] > =
114
117
if protected_attributes. len ( ) > 0 {
115
- & mut decrypted . chunks_exact ( protected_attributes . len ( ) )
118
+ & mut chunks_exact
116
119
} else {
117
- & mut std:: iter:: repeat_with :: < & [ Option < Plaintext > ] , _ > ( || & [ ] )
118
- . take ( plaintext_items. len ( ) )
120
+ & mut default_iter
119
121
} ;
120
122
121
123
let unsealed = decrypted_iter
You can’t perform that action at this time.
0 commit comments