From 89b80665d7a9374cf8098bcbd3926cc08d3d6c9c Mon Sep 17 00:00:00 2001 From: rzmk <30333942+rzmk@users.noreply.github.com> Date: Sun, 14 Jul 2024 10:18:54 -0400 Subject: [PATCH] `clipboard`: run `cargo +nightly fmt` --- src/cmd/clipboard.rs | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/src/cmd/clipboard.rs b/src/cmd/clipboard.rs index 4f81da727..0a035326c 100644 --- a/src/cmd/clipboard.rs +++ b/src/cmd/clipboard.rs @@ -40,24 +40,28 @@ struct Args { impl From for CliError { fn from(err: arboard::Error) -> Self { match err { - arboard::Error::ClipboardNotSupported => { - CliError::Other(format!("The clipboard may not be supported for the current environment.")) - }, - arboard::Error::ConversionFailure => { - CliError::Other(format!("The content that was about the be transferred to/from the clipboard could not be converted to the appropriate format.")) - }, - arboard::Error::ClipboardOccupied => { - CliError::Other(format!("The clipboard was unaccessible when attempting to access/use it. It may have been held by another process/thread.")) - }, - arboard::Error::ContentNotAvailable => { - CliError::Other(format!("The clipboard contents were not available in the requested format. This could either be due to the clipboard being empty or the clipboard contents having an incompatible format to the requested one.")) - }, - arboard::Error::Unknown { description: _ } => { - CliError::Other(format!("An unknown error occurred while attempting to use the clipboard.")) - }, - _ => { - CliError::Other(format!("An unexpected error occurred while using the clipboard.")) - } + arboard::Error::ClipboardNotSupported => CliError::Other(format!( + "The clipboard may not be supported for the current environment." + )), + arboard::Error::ConversionFailure => CliError::Other(format!( + "The content that was about the be transferred to/from the clipboard could not be \ + converted to the appropriate format." + )), + arboard::Error::ClipboardOccupied => CliError::Other(format!( + "The clipboard was unaccessible when attempting to access/use it. It may have \ + been held by another process/thread." + )), + arboard::Error::ContentNotAvailable => CliError::Other(format!( + "The clipboard contents were not available in the requested format. This could \ + either be due to the clipboard being empty or the clipboard contents having an \ + incompatible format to the requested one." + )), + arboard::Error::Unknown { description: _ } => CliError::Other(format!( + "An unknown error occurred while attempting to use the clipboard." + )), + _ => CliError::Other(format!( + "An unexpected error occurred while using the clipboard." + )), } } }