Skip to content

Commit

Permalink
fix: Specta remote implementation for Channel (#10435)
Browse files Browse the repository at this point in the history
* Update channel.rs
* Don't rely on `DataType` reexport
  • Loading branch information
oscartbeaumont authored Aug 1, 2024
1 parent 24445d7 commit 6755af2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changes/change-pr-10435.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": patch:bug
---

Fix Specta remote implementation target for `Channel`.
2 changes: 1 addition & 1 deletion core/tauri/src/ipc/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub struct Channel<TSend = InvokeBody> {
#[cfg(feature = "specta")]
const _: () = {
#[derive(specta::Type)]
#[specta(remote = Channel, rename = "TAURI_CHANNEL")]
#[specta(remote = super::Channel, rename = "TAURI_CHANNEL")]
struct Channel<TSend>(std::marker::PhantomData<TSend>);
};

Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ pub mod test;

#[cfg(feature = "specta")]
const _: () = {
use specta::{function::FunctionArg, DataType, TypeMap};
use specta::{datatype::DataType, function::FunctionArg, TypeMap};

impl<'r, T: Send + Sync + 'static> FunctionArg for crate::State<'r, T> {
fn to_datatype(_: &mut TypeMap) -> Option<DataType> {
Expand Down

0 comments on commit 6755af2

Please sign in to comment.