mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-08 16:04:13 -04:00
crypto: Remove an unwrap from the sqlite cryptostore.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
use std::{collections::HashSet, fmt::Debug, io::Error as IoError, sync::Arc};
|
||||
|
||||
use matrix_sdk_common::{
|
||||
identifiers::{DeviceId, RoomId, UserId},
|
||||
identifiers::{DeviceId, Error as IdentifierValidationError, RoomId, UserId},
|
||||
locks::Mutex,
|
||||
};
|
||||
use matrix_sdk_common_macros::async_trait;
|
||||
@@ -81,6 +81,10 @@ pub enum CryptoStoreError {
|
||||
#[error(transparent)]
|
||||
SessionUnpickling(#[from] SessionUnpicklingError),
|
||||
|
||||
/// A Matirx identifier failed to be validated.
|
||||
#[error(transparent)]
|
||||
IdentifierValidation(#[from] IdentifierValidationError),
|
||||
|
||||
/// The store failed to (de)serialize a data type.
|
||||
#[error(transparent)]
|
||||
Serialization(#[from] SerdeError),
|
||||
|
||||
@@ -398,8 +398,7 @@ impl SqliteStore {
|
||||
pickle: InboundGroupSessionPickle::from(pickle),
|
||||
sender_key,
|
||||
signing_key,
|
||||
// FIXME remove this unwrap.
|
||||
room_id: RoomId::try_from(room_id).unwrap(),
|
||||
room_id: RoomId::try_from(room_id)?,
|
||||
};
|
||||
|
||||
Ok(InboundGroupSession::from_pickle(
|
||||
|
||||
Reference in New Issue
Block a user