From 1c73c20a12389f389783e2c5b435dfd3c4b0a661 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Wed, 11 May 2022 21:02:19 +0530 Subject: [PATCH] fix: allow compiling on Rust 1.57.0 --- src/clipboard.rs | 2 +- src/config.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/clipboard.rs b/src/clipboard.rs index f51f542..a8adb02 100644 --- a/src/clipboard.rs +++ b/src/clipboard.rs @@ -26,7 +26,7 @@ impl<'a> ClipboardHandler for Handler<'a> { } let result = subst.action.apply_action(&contents); if let Err(e) = self.ctx.set_contents(result) { - error!("{e}"); + error!("{}", e); } }; } diff --git a/src/config.rs b/src/config.rs index b4575cc..e40a315 100644 --- a/src/config.rs +++ b/src/config.rs @@ -98,8 +98,8 @@ impl Act for Action<'_> { fn apply_action(&self, input: &str) -> String { return match self { Action::Replace { from, to } => input.replace(from, to), - Action::Prefix { prefix } => format!("{prefix}{input}"), - Action::Suffix { suffix } => format!("{input}{suffix}"), + Action::Prefix { prefix } => format!("{}{}", prefix, input), + Action::Suffix { suffix } => format!("{}{}", input, suffix), Action::Set { content } => content.to_owned().to_owned(), }; }