base: Don't unwrap when creating the olm machine.
parent
3b5c9d3c75
commit
6c3863f096
|
@ -59,7 +59,7 @@ use crate::identifiers::DeviceId;
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
use crate::JsonStore;
|
use crate::JsonStore;
|
||||||
#[cfg(feature = "encryption")]
|
#[cfg(feature = "encryption")]
|
||||||
use matrix_sdk_crypto::{CryptoStore, OlmMachine, OneTimeKeys};
|
use matrix_sdk_crypto::{CryptoStore, OlmError, OlmMachine, OneTimeKeys};
|
||||||
|
|
||||||
pub type Token = String;
|
pub type Token = String;
|
||||||
|
|
||||||
|
@ -437,7 +437,7 @@ impl BaseClient {
|
||||||
store,
|
store,
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.unwrap(),
|
.map_err(OlmError::from)?,
|
||||||
);
|
);
|
||||||
} else if let Some(path) = self.store_path.as_ref() {
|
} else if let Some(path) = self.store_path.as_ref() {
|
||||||
#[cfg(feature = "sqlite-cryptostore")]
|
#[cfg(feature = "sqlite-cryptostore")]
|
||||||
|
@ -450,7 +450,7 @@ impl BaseClient {
|
||||||
&self.store_passphrase,
|
&self.store_passphrase,
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.unwrap(),
|
.map_err(OlmError::from)?,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "sqlite-cryptostore"))]
|
#[cfg(not(feature = "sqlite-cryptostore"))]
|
||||||
|
|
Loading…
Reference in New Issue