diff --git a/.changes/core-channel-clone.md b/.changes/core-channel-clone.md new file mode 100644 index 000000000..c9c86a965 --- /dev/null +++ b/.changes/core-channel-clone.md @@ -0,0 +1,5 @@ +--- +'tauri': 'patch' +--- + +Implement `Clone` for `Channel` diff --git a/core/tauri/src/api/ipc.rs b/core/tauri/src/api/ipc.rs index fda6910f8..e4fccc99e 100644 --- a/core/tauri/src/api/ipc.rs +++ b/core/tauri/src/api/ipc.rs @@ -26,6 +26,15 @@ pub struct Channel { window: Window, } +impl Clone for Channel { + fn clone(&self) -> Self { + Self { + id: self.id, + window: self.window.clone(), + } + } +} + impl Serialize for Channel { fn serialize(&self, serializer: S) -> Result where