From 9167e54f4ed5dd4b5bcee7b37efb727a59b81b40 Mon Sep 17 00:00:00 2001 From: saying121 Date: Thu, 29 Aug 2024 10:24:14 +0800 Subject: [PATCH] fix(clippy): fix warnings --- crates/decrypt-cookies/src/browser/info.rs | 1 + crates/decrypt-cookies/src/safari/items/cookie/mod.rs | 3 ++- crates/decrypt-cookies/src/safari/utils/binary_cookies.rs | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/decrypt-cookies/src/browser/info.rs b/crates/decrypt-cookies/src/browser/info.rs index 3a31bee..7e4c765 100644 --- a/crates/decrypt-cookies/src/browser/info.rs +++ b/crates/decrypt-cookies/src/browser/info.rs @@ -438,6 +438,7 @@ pub mod macos { use super::{ChromiumInfo, FfInfo, TempPath}; use crate::Browser; + #[allow(clippy::exhaustive_structs)] #[derive(Clone)] #[derive(Debug)] #[derive(Default)] diff --git a/crates/decrypt-cookies/src/safari/items/cookie/mod.rs b/crates/decrypt-cookies/src/safari/items/cookie/mod.rs index 8683821..d9ec0f2 100644 --- a/crates/decrypt-cookies/src/safari/items/cookie/mod.rs +++ b/crates/decrypt-cookies/src/safari/items/cookie/mod.rs @@ -9,6 +9,7 @@ use crate::{ LeetCodeCookies, }; +#[non_exhaustive] #[derive(Clone)] #[derive(Debug)] #[derive(Default)] @@ -32,7 +33,7 @@ impl CookiesGetter { pub async fn build(cookies_path: Option) -> Result where - T: Into, + T: Into + Send, { let mut cookie_path; if let Some(path) = cookies_path { diff --git a/crates/decrypt-cookies/src/safari/utils/binary_cookies.rs b/crates/decrypt-cookies/src/safari/utils/binary_cookies.rs index 0c2371c..906a312 100644 --- a/crates/decrypt-cookies/src/safari/utils/binary_cookies.rs +++ b/crates/decrypt-cookies/src/safari/utils/binary_cookies.rs @@ -107,6 +107,7 @@ impl BinaryCookies { const PAGE_START_HEADER: [u8; 4] = [0x00, 0x00, 0x01, 0x00]; const END_HEADER: [u8; 4] = [0x00, 0x00, 0x00, 0x00]; + #[allow(clippy::panic_in_result_fn)] // raw data and some unnecessary data pub fn parse(file: &[u8]) -> Result { let mut entry = file;