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 {