mirror of
https://github.com/msfjarvis/clipboard-substitutor
synced 2025-08-14 22:27:03 +05:30
fix: allow compiling on Rust 1.57.0
This commit is contained in:
parent
0d7cace68c
commit
1c73c20a12
2 changed files with 3 additions and 3 deletions
|
@ -26,7 +26,7 @@ impl<'a> ClipboardHandler for Handler<'a> {
|
||||||
}
|
}
|
||||||
let result = subst.action.apply_action(&contents);
|
let result = subst.action.apply_action(&contents);
|
||||||
if let Err(e) = self.ctx.set_contents(result) {
|
if let Err(e) = self.ctx.set_contents(result) {
|
||||||
error!("{e}");
|
error!("{}", e);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,8 +98,8 @@ impl Act for Action<'_> {
|
||||||
fn apply_action(&self, input: &str) -> String {
|
fn apply_action(&self, input: &str) -> String {
|
||||||
return match self {
|
return match self {
|
||||||
Action::Replace { from, to } => input.replace(from, to),
|
Action::Replace { from, to } => input.replace(from, to),
|
||||||
Action::Prefix { prefix } => format!("{prefix}{input}"),
|
Action::Prefix { prefix } => format!("{}{}", prefix, input),
|
||||||
Action::Suffix { suffix } => format!("{input}{suffix}"),
|
Action::Suffix { suffix } => format!("{}{}", input, suffix),
|
||||||
Action::Set { content } => content.to_owned().to_owned(),
|
Action::Set { content } => content.to_owned().to_owned(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue