diff options
| author | sigoden <sigoden@gmail.com> | 2024-10-16 19:56:27 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-16 19:56:27 +0800 |
| commit | 98cc9879c7a87526548c325aa42eeb401cc11f35 (patch) | |
| tree | 36e7bfac05f0254a4b65b2d59cb244c8736f6bec /src/utils | |
| parent | 9935ecc12f9d84c4eb5c663f8d9362f6529d4ef2 (diff) | |
| download | aichat-98cc9879c7a87526548c325aa42eeb401cc11f35.tar.gz | |
feat: add shell action `copy` (#926)
Diffstat (limited to 'src/utils')
| -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 c96057f..6617fa4 100644 --- a/src/utils/clipboard.rs +++ b/src/utils/clipboard.rs @@ -9,12 +9,12 @@ pub fn set_text(text: &str) -> anyhow::Result<()> { let mut clipboard = CLIPBOARD.lock().unwrap(); match clipboard.as_mut() { Some(clipboard) => clipboard.set_text(text)?, - None => anyhow::bail!("No available clipboard"), + None => anyhow::bail!("Failed to copy the text; no available clipboard"), } Ok(()) } #[cfg(any(target_os = "android", target_os = "emscripten"))] pub fn set_text(_text: &str) -> anyhow::Result<()> { - anyhow::bail!("No available clipboard") + anyhow::bail!("Failed to copy the text; no available clipboard") } |
