chore: apply clippy fixes; suppress "too many lines" lint

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a696476135218b9979677c66c4be4d96aced8
This commit is contained in:
raf 2025-08-14 17:28:36 +03:00
commit 0547376a9e
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
2 changed files with 2 additions and 1 deletions

View file

@ -397,7 +397,7 @@ impl ClipboardDb for SqliteClipboardDb {
/// `Some(Regex)` if present and valid, `None` otherwise. /// `Some(Regex)` if present and valid, `None` otherwise.
fn load_sensitive_regex() -> Option<Regex> { fn load_sensitive_regex() -> Option<Regex> {
if let Ok(regex_path) = env::var("CREDENTIALS_DIRECTORY") { if let Ok(regex_path) = env::var("CREDENTIALS_DIRECTORY") {
let file = format!("{}/clipboard_filter", regex_path); let file = format!("{regex_path}/clipboard_filter");
if let Ok(contents) = fs::read_to_string(&file) { if let Ok(contents) = fs::read_to_string(&file) {
if let Ok(re) = Regex::new(contents.trim()) { if let Ok(re) = Regex::new(contents.trim()) {
return Some(re); return Some(re);

View file

@ -110,6 +110,7 @@ fn report_error<T>(result: Result<T, impl std::fmt::Display>, context: &str) ->
} }
} }
#[allow(clippy::too_many_lines)] // whatever
fn main() { fn main() {
smol::block_on(async { smol::block_on(async {
let cli = Cli::parse(); let cli = Cli::parse();