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);
3535pub struct ChannelDataIpcQueue ( pub ( crate ) Arc < Mutex < HashMap < u32 , InvokeResponseBody > > > ) ;
3636
3737/// An IPC channel.
38- #[ derive( Clone ) ]
3938pub struct Channel < TSend = InvokeResponseBody > {
4039 id : u32 ,
4140 on_message : Arc < dyn Fn ( InvokeResponseBody ) -> crate :: Result < ( ) > + Send + Sync > ,
@@ -49,6 +48,16 @@ const _: () = {
4948 struct Channel < TSend > ( std:: marker:: PhantomData < TSend > ) ;
5049} ;
5150
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+
5261impl < TSend > Serialize for Channel < TSend > {
5362 fn serialize < S > ( & self , serializer : S ) -> Result < S :: Ok , S :: Error >
5463 where
You can’t perform that action at this time.
0 commit comments