@@ -42,13 +42,13 @@ pub struct Sealer {
4242 pub ( crate ) unsealed : Unsealed ,
4343}
4444
45- struct RecordsWithTerms < ' a > {
45+ struct RecordsWithTerms {
4646 num_protected_attributes : usize ,
47- records : Vec < RecordWithTerms < ' a > > ,
47+ records : Vec < RecordWithTerms > ,
4848}
4949
50- impl < ' a > RecordsWithTerms < ' a > {
51- fn new ( records : Vec < RecordWithTerms < ' a > > , num_protected_attributes : usize ) -> Self {
50+ impl RecordsWithTerms {
51+ fn new ( records : Vec < RecordWithTerms > , num_protected_attributes : usize ) -> Self {
5252 Self {
5353 num_protected_attributes,
5454 records,
@@ -117,15 +117,13 @@ impl<'a> RecordsWithTerms<'a> {
117117 }
118118}
119119
120- struct RecordWithTerms < ' a > {
120+ struct RecordWithTerms {
121121 pksk : PrimaryKeyParts ,
122122 unsealed : Unsealed ,
123123 terms : Vec < Term > ,
124- // FIXME: Don't use a Vec here - too many copies
125- protected_attributes : Vec < Cow < ' a , str > > ,
126124}
127125
128- impl < ' a > RecordWithTerms < ' a > {
126+ impl RecordWithTerms {
129127 fn into_parts (
130128 self ,
131129 ) -> (
@@ -145,7 +143,7 @@ impl Sealer {
145143 protected_attributes : impl AsRef < [ Cow < ' a , str > ] > ,
146144 cipher : & Encryption < impl Credentials < Token = ServiceToken > > ,
147145 term_length : usize ,
148- ) -> Result < RecordsWithTerms < ' a > , SealError > {
146+ ) -> Result < RecordsWithTerms , SealError > {
149147 let protected_attributes = protected_attributes. as_ref ( ) ;
150148 let num_protected_attributes = protected_attributes. len ( ) ;
151149
@@ -211,7 +209,6 @@ impl Sealer {
211209 pksk : PrimaryKeyParts { pk, sk } ,
212210 unsealed : sealer. unsealed ,
213211 terms,
214- protected_attributes : protected_attributes. to_vec ( ) ,
215212 } )
216213 } )
217214 . try_collect ( )
0 commit comments