diff options
author | Orhun Parmaksız <orhunparmaksiz@gmail.com> | 2022-09-29 23:10:38 +0200 |
---|---|---|
committer | Orhun Parmaksız <orhunparmaksiz@gmail.com> | 2022-09-29 23:10:38 +0200 |
commit | 327ca7c52b348870dd61e2181d7e50f3b5502790 (patch) | |
tree | 4ec431218766231bc3aeace97f6a7944569b4bef | |
parent | ce553d6200ebfc0f53605e7740432a95d710fc06 (diff) |
refactor: Handle errors while setting the clipboard contents
-rw-r--r-- | src/app.rs | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -240,7 +240,9 @@ impl App { */ pub fn set_clipboard_contents(&mut self, contents: &str) { if let Some(clipboard) = self.clipboard.as_mut() { - clipboard.set_contents(contents.to_string()).unwrap(); + if let Err(e) = clipboard.set_contents(contents.to_string()) { + eprintln!("{}", e); + } } } |