File tree Expand file tree Collapse file tree 2 files changed +8
-13
lines changed Expand file tree Collapse file tree 2 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -103,15 +103,16 @@ impl<T> Sealer<T> {
103
103
term_length,
104
104
)
105
105
. map_err ( SealError :: CryptoError )
106
- . and_then ( |index_term| match index_term {
107
- IndexTerm :: Binary ( x) => Ok ( vec ! [ ( index_name, x) ] ) ,
108
- IndexTerm :: BinaryVec ( x) => {
109
- Ok ( x. into_iter ( ) . map ( |x| ( index_name, x) ) . collect ( ) )
110
- }
111
- _ => Err ( SealError :: InvalidCiphertext ( "Invalid index term" . into ( ) ) ) ,
112
- } )
106
+ . map ( |result| ( index_name, result) )
113
107
} )
114
108
} )
109
+ . map ( |index_term| match index_term {
110
+ Ok ( ( index_name, IndexTerm :: Binary ( x) ) ) => Ok ( vec ! [ ( index_name, x) ] ) ,
111
+ Ok ( ( index_name, IndexTerm :: BinaryVec ( x) ) ) => {
112
+ Ok ( x. into_iter ( ) . map ( |x| ( index_name, x) ) . collect ( ) )
113
+ }
114
+ _ => Err ( SealError :: InvalidCiphertext ( "Invalid index term" . into ( ) ) ) ,
115
+ } )
115
116
. flatten_ok ( )
116
117
. try_collect ( ) ?;
117
118
Original file line number Diff line number Diff line change @@ -54,12 +54,6 @@ pub trait Searchable: Encryptable {
54
54
}
55
55
}
56
56
57
- /*
58
- We need to identify which fields from TableAttributes are encrypted and which are plaintext.
59
- Decrypt the ciphertexts and convert them all into the final record.
60
- Conversion would take the that were decrypted and a subset of the TableAttributes.
61
- */
62
-
63
57
pub trait Decryptable : Encryptable {
64
58
/// Convert an `Unsealed` into a `Self`.
65
59
fn from_unsealed ( unsealed : Unsealed ) -> Result < Self , SealError > ;
You can’t perform that action at this time.
0 commit comments