File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " tauri " : " patch:bug"
3
+ ---
4
+
5
+ Removed ` TSend: Clone ` requirement for ` Channel<TSend> ` by implementing ` Clone ` manually instead of driving it.
Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ static CHANNEL_DATA_COUNTER: AtomicU32 = AtomicU32::new(0);
35
35
pub struct ChannelDataIpcQueue ( pub ( crate ) Arc < Mutex < HashMap < u32 , InvokeResponseBody > > > ) ;
36
36
37
37
/// An IPC channel.
38
- #[ derive( Clone ) ]
39
38
pub struct Channel < TSend = InvokeResponseBody > {
40
39
id : u32 ,
41
40
on_message : Arc < dyn Fn ( InvokeResponseBody ) -> crate :: Result < ( ) > + Send + Sync > ,
@@ -49,6 +48,16 @@ const _: () = {
49
48
struct Channel < TSend > ( std:: marker:: PhantomData < TSend > ) ;
50
49
} ;
51
50
51
+ impl < TSend > Clone for Channel < TSend > {
52
+ fn clone ( & self ) -> Self {
53
+ Self {
54
+ id : self . id ,
55
+ on_message : self . on_message . clone ( ) ,
56
+ phantom : Default :: default ( ) ,
57
+ }
58
+ }
59
+ }
60
+
52
61
impl < TSend > Serialize for Channel < TSend > {
53
62
fn serialize < S > ( & self , serializer : S ) -> Result < S :: Ok , S :: Error >
54
63
where
You can’t perform that action at this time.
0 commit comments