File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
crates/matrix-sdk-indexeddb/src/crypto_store Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ pub struct IndexeddbSerializer {
39
39
store_cipher : Option < Arc < StoreCipher > > ,
40
40
}
41
41
42
- #[ allow( dead_code) ]
43
42
#[ derive( Debug , thiserror:: Error ) ]
44
43
pub enum IndexeddbSerializerError {
45
44
#[ error( transparent) ]
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ use async_trait::async_trait;
21
21
use gloo_utils:: format:: JsValueSerdeExt ;
22
22
use hkdf:: Hkdf ;
23
23
use indexed_db_futures:: prelude:: * ;
24
+ use indexeddb_serializer:: IndexeddbSerializerError ;
24
25
use js_sys:: Array ;
25
26
use matrix_sdk_crypto:: {
26
27
olm:: {
@@ -148,6 +149,20 @@ pub enum IndexeddbCryptoStoreError {
148
149
SchemaTooNewError { max_supported_version : u32 , current_version : u32 } ,
149
150
}
150
151
152
+ impl From < IndexeddbSerializerError > for IndexeddbCryptoStoreError {
153
+ fn from ( value : IndexeddbSerializerError ) -> Self {
154
+ match value {
155
+ IndexeddbSerializerError :: Serialization ( error) => Self :: Serialization ( error) ,
156
+ IndexeddbSerializerError :: DomException { code, name, message } => {
157
+ Self :: DomException { code, name, message }
158
+ }
159
+ IndexeddbSerializerError :: CryptoStoreError ( crypto_store_error) => {
160
+ Self :: CryptoStoreError ( crypto_store_error)
161
+ }
162
+ }
163
+ }
164
+ }
165
+
151
166
impl From < web_sys:: DomException > for IndexeddbCryptoStoreError {
152
167
fn from ( frm : web_sys:: DomException ) -> IndexeddbCryptoStoreError {
153
168
IndexeddbCryptoStoreError :: DomException {
You can’t perform that action at this time.
0 commit comments