mirror of
https://github.com/msfjarvis/clipboard-substitutor
synced 2025-08-14 22:27:03 +05:30
refactor: fix clippy::pedantic
lints
This commit is contained in:
parent
51b547f73b
commit
7274d8acb2
2 changed files with 4 additions and 4 deletions
|
@ -46,8 +46,8 @@ fn truncate(s: &str, max_chars: usize) -> &str {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn monitor_clipboard<'a>(config: Replacements<'_>) {
|
||||
pub fn monitor(config: Replacements<'_>) {
|
||||
let ctx = ClipboardContext::new().expect("Failed to acquire clipboard");
|
||||
let handler = Handler { ctx, config };
|
||||
let _ = Master::new(handler).run();
|
||||
let _master = Master::new(handler).run();
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ use std::path::PathBuf;
|
|||
use anyhow::{anyhow, Result};
|
||||
use dirs::config_dir;
|
||||
|
||||
use crate::clipboard::monitor_clipboard;
|
||||
use crate::clipboard::monitor;
|
||||
use crate::config::Replacements;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
|
@ -20,7 +20,7 @@ fn main() -> Result<()> {
|
|||
let config_str =
|
||||
std::fs::read_to_string(config_path.as_path()).unwrap_or_default();
|
||||
let config: Replacements<'_> = toml::from_str(&config_str)?;
|
||||
monitor_clipboard(config);
|
||||
monitor(config);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue