refactor(clipboard): refactor clipboard function arguments for better clarity about the needed type (#1218)

This commit is contained in:
Amr Bashir
2024-04-24 16:44:48 +02:00
committed by GitHub
parent 9c7eb35967
commit 1f16c64d67
9 changed files with 145 additions and 157 deletions
+11
View File
@@ -0,0 +1,11 @@
---
"clipboard-manager": "patch"
---
Refactored the clipboard Rust APIs for more clarity and consistency:
- Changed `Clipboard::write_text` to take a string type instead of an enum.
- Changed `Clipboard::read_text` to return a string type instead of an enum.
- Changed `Clipboard::write_html` to take 2 string arguments instead of an enum.
- Changed `Clipboard::write_image` to take a reference to a `tauri::Image` instead of an enum.
- Removed `ClipKind` and `ClipboardContents` enums.