File tree 2 files changed +6
-6
lines changed
matrix-sdk-crypto/src/store 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -58,15 +58,15 @@ use crate::{
58
58
#[ cfg_attr( target_arch = "wasm32" , async_trait:: async_trait( ?Send ) ) ]
59
59
#[ cfg_attr( not( target_arch = "wasm32" ) , async_trait:: async_trait) ]
60
60
pub trait BackingStore {
61
- type Error : Error + Send + Sync ;
61
+ type LockError : Error + Send + Sync ;
62
62
63
63
/// Try to take a lock using the given store.
64
64
async fn try_lock (
65
65
& self ,
66
66
lease_duration_ms : u32 ,
67
67
key : & str ,
68
68
holder : & str ,
69
- ) -> Result < bool , Self :: Error > ;
69
+ ) -> Result < bool , Self :: LockError > ;
70
70
}
71
71
72
72
/// Small state machine to handle wait times.
@@ -400,15 +400,15 @@ mod tests {
400
400
#[ cfg_attr( target_arch = "wasm32" , async_trait:: async_trait( ?Send ) ) ]
401
401
#[ cfg_attr( not( target_arch = "wasm32" ) , async_trait:: async_trait) ]
402
402
impl BackingStore for TestStore {
403
- type Error = DummyError ;
403
+ type LockError = DummyError ;
404
404
405
405
/// Try to take a lock using the given store.
406
406
async fn try_lock (
407
407
& self ,
408
408
lease_duration_ms : u32 ,
409
409
key : & str ,
410
410
holder : & str ,
411
- ) -> Result < bool , Self :: Error > {
411
+ ) -> Result < bool , Self :: LockError > {
412
412
Ok ( self . try_take_leased_lock ( lease_duration_ms, key, holder) )
413
413
}
414
414
}
Original file line number Diff line number Diff line change @@ -1925,14 +1925,14 @@ pub struct LockableCryptoStore(Arc<dyn CryptoStore<Error = CryptoStoreError>>);
1925
1925
#[ cfg_attr( target_arch = "wasm32" , async_trait:: async_trait( ?Send ) ) ]
1926
1926
#[ cfg_attr( not( target_arch = "wasm32" ) , async_trait:: async_trait) ]
1927
1927
impl matrix_sdk_common:: store_locks:: BackingStore for LockableCryptoStore {
1928
- type Error = CryptoStoreError ;
1928
+ type LockError = CryptoStoreError ;
1929
1929
1930
1930
async fn try_lock (
1931
1931
& self ,
1932
1932
lease_duration_ms : u32 ,
1933
1933
key : & str ,
1934
1934
holder : & str ,
1935
- ) -> std:: result:: Result < bool , Self :: Error > {
1935
+ ) -> std:: result:: Result < bool , Self :: LockError > {
1936
1936
self . 0 . try_take_leased_lock ( lease_duration_ms, key, holder) . await
1937
1937
}
1938
1938
}
You can’t perform that action at this time.
0 commit comments