diff options
Diffstat (limited to 'src/utils/clipboard.rs')
| -rw-r--r-- | src/utils/clipboard.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/clipboard.rs b/src/utils/clipboard.rs index c4444e3..23bb4f3 100644 --- a/src/utils/clipboard.rs +++ b/src/utils/clipboard.rs @@ -13,12 +13,12 @@ pub fn set_text(text: &str) -> anyhow::Result<()> { #[cfg(target_os = "linux")] std::thread::sleep(std::time::Duration::from_millis(50)); } - None => anyhow::bail!("Failed to copy the text; no available clipboard"), + None => return Err(anyhow::anyhow!("No clipboard available").context("Failed to copy")), } Ok(()) } #[cfg(any(target_os = "android", target_os = "emscripten"))] pub fn set_text(_text: &str) -> anyhow::Result<()> { - anyhow::bail!("Failed to copy the text; no available clipboard") + Err(anyhow::anyhow!("No clipboard available").context("Failed to copy")) } |
