simplify error handling

This commit is contained in:
Jonas Kruckenberg 2022-11-13 21:19:00 +01:00
parent e431dc89a8
commit bd652c956f
8 changed files with 94 additions and 147 deletions

View file

@ -4,7 +4,7 @@ use tauri_sys::clipboard;
pub async fn test() -> anyhow::Result<()> {
clipboard::write_text("foobar").await;
let text = clipboard::read_text().await;
let text = clipboard::read_text().await?;
ensure!(text == Some("foobar".to_string()));