fix(specta): don't use #[specta(rename = ...)] with tauri::ipc::Channel (#14812)

This commit is contained in:
Oscar Beaumont
2026-01-24 18:00:40 +08:00
committed by GitHub
parent 4794a6ba22
commit 4d5d78daf6
2 changed files with 8 additions and 3 deletions

View File

@@ -0,0 +1,5 @@
---
"tauri": patch:bug
---
fix(specta): don't use `#[specta(rename = ...)]` with `tauri::ipc::Channel`

View File

@@ -54,9 +54,9 @@ pub struct Channel<TSend = InvokeResponseBody> {
#[cfg(feature = "specta")]
const _: () = {
#[derive(specta::Type)]
#[specta(remote = super::Channel, rename = "TAURI_CHANNEL")]
#[allow(dead_code)]
struct Channel<TSend>(std::marker::PhantomData<TSend>);
#[specta(remote = super::Channel)]
#[allow(dead_code, non_camel_case_types)]
struct TAURI_CHANNEL<TSend>(std::marker::PhantomData<TSend>);
};
impl<TSend> Clone for Channel<TSend> {