fix: allow compiling on Rust 1.57.0

This commit is contained in:
Harsh Shandilya 2022-05-11 21:02:19 +05:30
parent 0d7cace68c
commit 1c73c20a12
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80
2 changed files with 3 additions and 3 deletions

View file

@ -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);
}
};
}

View file

@ -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(),
};
}