From b3cec50e474cf17a6488ad9c134da9ae80c53012 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sun, 16 Mar 2025 17:47:13 -0300 Subject: [PATCH] lint --- examples/api/src-tauri/src/lib.rs | 4 ++-- plugins/http/src/lib.rs | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/examples/api/src-tauri/src/lib.rs b/examples/api/src-tauri/src/lib.rs index e4ef2062..a19992b0 100644 --- a/examples/api/src-tauri/src/lib.rs +++ b/examples/api/src-tauri/src/lib.rs @@ -114,8 +114,8 @@ pub fn run() { headers.push( tiny_http::Header::from_bytes( &b"Set-Cookie"[..], - &format!("session-token=test-value; Secure; Path=/; Expires={expires_str}") - .as_bytes()[..], + format!("session-token=test-value; Secure; Path=/; Expires={expires_str}") + .as_bytes(), ) .unwrap(), ); diff --git a/plugins/http/src/lib.rs b/plugins/http/src/lib.rs index 11331f99..8999917c 100644 --- a/plugins/http/src/lib.rs +++ b/plugins/http/src/lib.rs @@ -43,15 +43,13 @@ pub fn init() -> TauriPlugin { .open(&path)?; let reader = BufReader::new(file); - let store = CookieStoreMutex::load(path.clone(), reader).unwrap_or_else(|_e| { + CookieStoreMutex::load(path.clone(), reader).unwrap_or_else(|_e| { #[cfg(feature = "tracing")] tracing::warn!( "failed to load cookie store: {_e}, falling back to empty store" ); CookieStoreMutex::new(path, Default::default()) - }); - - store + }) }; let state = Http {