From d5dee700d11655628ff47f5972be44bcd84ac61a Mon Sep 17 00:00:00 2001 From: xrelkd <46590321+xrelkd@users.noreply.github.com> Date: Sun, 31 Dec 2023 19:21:48 +0800 Subject: [PATCH] fix(clipcatctl): fix lints and errors --- clipcatctl/src/error.rs | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/clipcatctl/src/error.rs b/clipcatctl/src/error.rs index c6410209..d0070531 100644 --- a/clipcatctl/src/error.rs +++ b/clipcatctl/src/error.rs @@ -25,7 +25,7 @@ pub enum Error { Client { source: clipcat_client::Error }, #[snafu(display("Error occurs while interacting with server, error: {error}"))] - OperationError { error: String }, + Operation { error: String }, #[snafu(display("{error}"))] EncodeData { error: clipcat_base::ClipEntryError }, @@ -44,85 +44,85 @@ impl From for Error { impl From for Error { fn from(err: clipcat_client::error::InsertClipError) -> Self { - Self::OperationError { error: err.to_string() } + Self::Operation { error: err.to_string() } } } impl From for Error { fn from(err: clipcat_client::error::GetClipError) -> Self { - Self::OperationError { error: err.to_string() } + Self::Operation { error: err.to_string() } } } impl From for Error { fn from(err: clipcat_client::error::GetCurrentClipError) -> Self { - Self::OperationError { error: err.to_string() } + Self::Operation { error: err.to_string() } } } impl From for Error { fn from(err: clipcat_client::error::GetLengthError) -> Self { - Self::OperationError { error: err.to_string() } + Self::Operation { error: err.to_string() } } } impl From for Error { fn from(err: clipcat_client::error::ClearClipError) -> Self { - Self::OperationError { error: err.to_string() } + Self::Operation { error: err.to_string() } } } impl From for Error { fn from(err: clipcat_client::error::RemoveClipError) -> Self { - Self::OperationError { error: err.to_string() } + Self::Operation { error: err.to_string() } } } impl From for Error { fn from(err: clipcat_client::error::BatchRemoveClipError) -> Self { - Self::OperationError { error: err.to_string() } + Self::Operation { error: err.to_string() } } } impl From for Error { fn from(err: clipcat_client::error::MarkClipError) -> Self { - Self::OperationError { error: err.to_string() } + Self::Operation { error: err.to_string() } } } impl From for Error { fn from(err: clipcat_client::error::UpdateClipError) -> Self { - Self::OperationError { error: err.to_string() } + Self::Operation { error: err.to_string() } } } impl From for Error { fn from(err: clipcat_client::error::ListClipError) -> Self { - Self::OperationError { error: err.to_string() } + Self::Operation { error: err.to_string() } } } impl From for Error { fn from(err: clipcat_client::error::EnableWatcherError) -> Self { - Self::OperationError { error: err.to_string() } + Self::Operation { error: err.to_string() } } } impl From for Error { fn from(err: clipcat_client::error::DisableWatcherError) -> Self { - Self::OperationError { error: err.to_string() } + Self::Operation { error: err.to_string() } } } impl From for Error { fn from(err: clipcat_client::error::ToggleWatcherError) -> Self { - Self::OperationError { error: err.to_string() } + Self::Operation { error: err.to_string() } } } impl From for Error { fn from(err: clipcat_client::error::GetWatcherStateError) -> Self { - Self::OperationError { error: err.to_string() } + Self::Operation { error: err.to_string() } } }