mirror of
https://github.com/msfjarvis/clipboard-substitutor
synced 2025-08-15 08:57:00 +05:30
fix: adjust for toml 0.6.0 upgrade
This commit is contained in:
parent
561733796b
commit
a0ba1db28a
3 changed files with 33 additions and 36 deletions
|
@ -7,12 +7,12 @@ use tracing::{debug, error};
|
|||
|
||||
use crate::config::{Act, Match, Replacements};
|
||||
|
||||
struct Handler<'a> {
|
||||
struct Handler {
|
||||
ctx: ClipboardContext,
|
||||
config: Replacements<'a>,
|
||||
config: Replacements,
|
||||
}
|
||||
|
||||
impl<'a> ClipboardHandler for Handler<'a> {
|
||||
impl ClipboardHandler for Handler {
|
||||
fn on_clipboard_change(&mut self) -> CallbackResult {
|
||||
if let Ok(contents) = self.ctx.get_contents() {
|
||||
if let Some(subst) = self
|
||||
|
@ -39,7 +39,7 @@ impl<'a> ClipboardHandler for Handler<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn monitor(config: Replacements<'_>) {
|
||||
pub fn monitor(config: Replacements) {
|
||||
let ctx = ClipboardContext::new().expect("Failed to acquire clipboard");
|
||||
let handler = Handler { ctx, config };
|
||||
let _master = Master::new(handler).run();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue