diff --git a/.changes/change-pr-15262.md b/.changes/change-pr-15262.md new file mode 100644 index 000000000000..9f54c0eb4f43 --- /dev/null +++ b/.changes/change-pr-15262.md @@ -0,0 +1,5 @@ +--- +"tauri": patch:enhance +--- + +Remove a clone, no user-facing changes. diff --git a/crates/tauri/src/ipc/protocol.rs b/crates/tauri/src/ipc/protocol.rs index 1b1e08b8f9b4..fba3a029f43f 100644 --- a/crates/tauri/src/ipc/protocol.rs +++ b/crates/tauri/src/ipc/protocol.rs @@ -466,15 +466,11 @@ fn parse_invoke_request( (body, content_type) = crate::utils::pattern::isolation::RawIsolationPayload::try_from(&body) .and_then(|raw| { - let content_type = raw.content_type().clone(); - crypto_keys.decrypt(raw).map(|decrypted| { - ( - decrypted, - content_type - .parse() - .unwrap_or(mime::APPLICATION_OCTET_STREAM), - ) - }) + let content_type = raw + .content_type() + .parse() + .unwrap_or(mime::APPLICATION_OCTET_STREAM); + Ok((crypto_keys.decrypt(raw)?, content_type)) }) .map_err(|e| e.to_string())?; }