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 {
109109        } 
110110
111111        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 ( ) ) ; 
112115
113116        let  decrypted_iter:  & mut  dyn  Iterator < Item  = & [ Option < Plaintext > ] >  =
114117            if  protected_attributes. len ( )  > 0  { 
115-                 & mut  decrypted . chunks_exact ( protected_attributes . len ( ) ) 
118+                 & mut  chunks_exact
116119            }  else  { 
117-                 & mut  std:: iter:: repeat_with :: < & [ Option < Plaintext > ] ,  _ > ( || & [ ] ) 
118-                     . take ( plaintext_items. len ( ) ) 
120+                 & mut  default_iter
119121            } ; 
120122
121123        let  unsealed = decrypted_iter
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments