fix: adjust for toml 0.6.0 upgrade

This commit is contained in:
Harsh Shandilya 2023-01-24 17:15:51 +00:00
parent 561733796b
commit a0ba1db28a
3 changed files with 33 additions and 36 deletions

View file

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