Skip to content

Commit b66e7d6

Browse files
authored
feat(core): impl clone for Channel (#7174)
1 parent 8124145 commit b66e7d6

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.changes/core-channel-clone.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'tauri': 'patch'
3+
---
4+
5+
Implement `Clone` for `Channel`

core/tauri/src/api/ipc.rs

+9
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ pub struct Channel<R: Runtime> {
2626
window: Window<R>,
2727
}
2828

29+
impl<R: Runtime> Clone for Channel<R> {
30+
fn clone(&self) -> Self {
31+
Self {
32+
id: self.id,
33+
window: self.window.clone(),
34+
}
35+
}
36+
}
37+
2938
impl Serialize for Channel {
3039
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3140
where

0 commit comments

Comments
 (0)