Skip to content

Commit c69d5ca

Browse files
authored
Non-breaking version of PR 15127 (#15262)
1 parent b536dce commit c69d5ca

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

.changes/change-pr-15262.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch:enhance
3+
---
4+
5+
Remove a clone, no user-facing changes.

crates/tauri/src/ipc/protocol.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -466,15 +466,11 @@ fn parse_invoke_request<R: Runtime>(
466466

467467
(body, content_type) = crate::utils::pattern::isolation::RawIsolationPayload::try_from(&body)
468468
.and_then(|raw| {
469-
let content_type = raw.content_type().clone();
470-
crypto_keys.decrypt(raw).map(|decrypted| {
471-
(
472-
decrypted,
473-
content_type
474-
.parse()
475-
.unwrap_or(mime::APPLICATION_OCTET_STREAM),
476-
)
477-
})
469+
let content_type = raw
470+
.content_type()
471+
.parse()
472+
.unwrap_or(mime::APPLICATION_OCTET_STREAM);
473+
Ok((crypto_keys.decrypt(raw)?, content_type))
478474
})
479475
.map_err(|e| e.to_string())?;
480476
}

0 commit comments

Comments
 (0)