mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-06-21 22:58:32 -04:00
timeline: remove unused error variants
This commit is contained in:
@@ -17,7 +17,6 @@ use matrix_sdk::{
|
||||
room::edit::EditError,
|
||||
send_queue::{RoomSendQueueError, RoomSendQueueStorageError},
|
||||
};
|
||||
use ruma::OwnedTransactionId;
|
||||
use thiserror::Error;
|
||||
|
||||
/// Errors specific to the timeline.
|
||||
@@ -28,10 +27,6 @@ pub enum Error {
|
||||
#[error("Event with remote echo not found in timeline")]
|
||||
RemoteEventNotInTimeline,
|
||||
|
||||
/// Can't find an event with the given transaction ID, can't retry.
|
||||
#[error("Event not found, can't retry sending")]
|
||||
RetryEventNotInTimeline,
|
||||
|
||||
/// The event is currently unsupported for this use case..
|
||||
#[error("Unsupported event")]
|
||||
UnsupportedEvent,
|
||||
@@ -52,14 +47,6 @@ pub enum Error {
|
||||
#[error("Failed toggling reaction")]
|
||||
FailedToToggleReaction,
|
||||
|
||||
/// The room is not in a joined state.
|
||||
#[error("Room is not joined")]
|
||||
RoomNotJoined,
|
||||
|
||||
/// Could not get user.
|
||||
#[error("User ID is not available")]
|
||||
UserIdNotAvailable,
|
||||
|
||||
/// Something went wrong with the room event cache.
|
||||
#[error("Something went wrong with the room event cache.")]
|
||||
EventCacheError(#[from] EventCacheError),
|
||||
@@ -104,23 +91,16 @@ pub enum UnsupportedReplyItem {
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum UnsupportedEditItem {
|
||||
#[error("tried to edit a non-message event")]
|
||||
NotRoomMessage,
|
||||
#[error("tried to edit a non-poll event")]
|
||||
NotPollEvent,
|
||||
#[error("tried to edit another user's event")]
|
||||
NotOwnEvent,
|
||||
#[error("event to edit not found")]
|
||||
MissingEvent,
|
||||
#[error("failed to deserialize event to edit")]
|
||||
FailedToDeserializeEvent,
|
||||
}
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum SendEventError {
|
||||
#[error(transparent)]
|
||||
UnsupportedReplyItem(#[from] UnsupportedReplyItem),
|
||||
|
||||
#[error(transparent)]
|
||||
UnsupportedEditItem(#[from] UnsupportedEditItem),
|
||||
|
||||
@@ -130,9 +110,6 @@ pub enum SendEventError {
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum RedactEventError {
|
||||
#[error("the given local event (with transaction id {0}) doesn't support redaction")]
|
||||
UnsupportedRedactLocal(OwnedTransactionId),
|
||||
|
||||
#[error(transparent)]
|
||||
SdkError(#[from] matrix_sdk::Error),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user