mirror of
https://github.com/openai/codex.git
synced 2026-04-24 06:35:50 +00:00
codex srsly?
This commit is contained in:
@@ -15,17 +15,9 @@ impl std::fmt::Display for ClipboardTextError {
|
||||
|
||||
impl std::error::Error for ClipboardTextError {}
|
||||
|
||||
#[cfg(not(target_os = "android"))]
|
||||
pub fn copy_text_to_clipboard(text: &str) -> Result<(), ClipboardTextError> {
|
||||
let mut cb = arboard::Clipboard::new()
|
||||
.map_err(|e| ClipboardTextError::ClipboardUnavailable(e.to_string()))?;
|
||||
cb.set_text(text.to_string())
|
||||
.map_err(|e| ClipboardTextError::ClipboardUnavailable(e.to_string()))
|
||||
}
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
pub fn copy_text_to_clipboard(_text: &str) -> Result<(), ClipboardTextError> {
|
||||
Err(ClipboardTextError::ClipboardUnavailable(
|
||||
"clipboard text copy is unsupported on Android".into(),
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user