diff options
author | Stephan Dilly <dilly.stephan@gmail.com> | 2020-09-27 18:56:20 +0200 |
---|---|---|
committer | Stephan Dilly <dilly.stephan@gmail.com> | 2020-09-27 18:56:20 +0200 |
commit | a991810f01f6c71db57ac10cc566c4d33b22fbb4 (patch) | |
tree | 65bd9b8519157a7f88373c9d8e0f8595fcc63ef8 /src | |
parent | 17240e47fcea7892c6e91d42417c9fdf11057fed (diff) |
fix nightly build
Diffstat (limited to 'src')
-rw-r--r-- | src/clipboard.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/clipboard.rs b/src/clipboard.rs index 2828ff65..1654311f 100644 --- a/src/clipboard.rs +++ b/src/clipboard.rs @@ -7,9 +7,12 @@ pub fn copy_string(string: String) -> Result<()> { use anyhow::anyhow; let mut ctx: ClipboardContext = ClipboardProvider::new() - .map_err(|_| anyhow!("failed to get access to clipboard"))?; - ctx.set_contents(string) - .map_err(|_| anyhow!("failed to set clipboard contents"))?; + .map_err(|e| { + anyhow!("failed to get access to clipboard: {}", e) + })?; + ctx.set_contents(string).map_err(|e| { + anyhow!("failed to set clipboard contents: {}", e) + })?; Ok(()) } |