Skip to content

Commit 4d5d78d

Browse files
fix(specta): don't use #[specta(rename = ...)] with tauri::ipc::Channel (#14812)
1 parent 4794a6b commit 4d5d78d

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

.changes/change-pr-14812.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch:bug
3+
---
4+
5+
fix(specta): don't use `#[specta(rename = ...)]` with `tauri::ipc::Channel`

crates/tauri/src/ipc/channel.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ pub struct Channel<TSend = InvokeResponseBody> {
5454
#[cfg(feature = "specta")]
5555
const _: () = {
5656
#[derive(specta::Type)]
57-
#[specta(remote = super::Channel, rename = "TAURI_CHANNEL")]
58-
#[allow(dead_code)]
59-
struct Channel<TSend>(std::marker::PhantomData<TSend>);
57+
#[specta(remote = super::Channel)]
58+
#[allow(dead_code, non_camel_case_types)]
59+
struct TAURI_CHANNEL<TSend>(std::marker::PhantomData<TSend>);
6060
};
6161

6262
impl<TSend> Clone for Channel<TSend> {

0 commit comments

Comments
 (0)