From 42747e0f4c96a71ebc878e46e00ddb988ca974b9 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 1 May 2022 18:00:48 +0530 Subject: [PATCH] refactor: fix clippy lints --- src/clipboard.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/clipboard.rs b/src/clipboard.rs index 2a9aaa1..a6d416f 100644 --- a/src/clipboard.rs +++ b/src/clipboard.rs @@ -25,7 +25,7 @@ impl<'a> ClipboardHandler for Handler<'a> { debug!("{}: matched on {}...", &subst.name, truncate(&contents, 40)); } let result = subst.action.apply_action(&contents); - if let Err(e) = self.ctx.set_contents(result.to_owned()) { + if let Err(e) = self.ctx.set_contents(result) { error!("{e}"); } }; @@ -46,7 +46,7 @@ fn truncate(s: &str, max_chars: usize) -> &str { } } -pub fn monitor_clipboard<'a>(config: Replacements<'a>) { +pub fn monitor_clipboard<'a>(config: Replacements<'_>) { let ctx = ClipboardContext::new().expect("Failed to acquire clipboard"); let handler = Handler { ctx, config }; let _ = Master::new(handler).run();