base: Don't unwrap when creating the olm machine.

master
Damir Jelić 2020-05-25 14:58:06 +02:00
parent 3b5c9d3c75
commit 6c3863f096
1 changed files with 3 additions and 3 deletions

View File

@ -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"))]