File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 1515//! Background tasks provide plugins the ability to inform the core of long-running background tasks.
1616
1717use binaryninjacore_sys:: * ;
18+ use std:: fmt:: Debug ;
1819
1920use std:: result;
2021
@@ -89,6 +90,17 @@ impl BackgroundTask {
8990 }
9091}
9192
93+ impl Debug for BackgroundTask {
94+ fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
95+ f. debug_struct ( "BackgroundTask" )
96+ . field ( "progress_text" , & self . progress_text ( ) )
97+ . field ( "can_cancel" , & self . can_cancel ( ) )
98+ . field ( "is_cancelled" , & self . is_cancelled ( ) )
99+ . field ( "is_finished" , & self . is_finished ( ) )
100+ . finish ( )
101+ }
102+ }
103+
92104unsafe impl RefCountable for BackgroundTask {
93105 unsafe fn inc_ref ( handle : & Self ) -> Ref < Self > {
94106 Ref :: new ( Self {
Original file line number Diff line number Diff line change @@ -119,6 +119,9 @@ impl Debug for ProjectFile {
119119 }
120120}
121121
122+ unsafe impl Send for ProjectFile { }
123+ unsafe impl Sync for ProjectFile { }
124+
122125impl ToOwned for ProjectFile {
123126 type Owned = Ref < Self > ;
124127
Original file line number Diff line number Diff line change @@ -102,6 +102,12 @@ impl ProjectFolder {
102102 }
103103}
104104
105+ impl PartialEq for ProjectFolder {
106+ fn eq ( & self , other : & Self ) -> bool {
107+ self . id ( ) == other. id ( )
108+ }
109+ }
110+
105111impl Debug for ProjectFolder {
106112 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
107113 f. debug_struct ( "ProjectFolder" )
@@ -112,6 +118,9 @@ impl Debug for ProjectFolder {
112118 }
113119}
114120
121+ unsafe impl Send for ProjectFolder { }
122+ unsafe impl Sync for ProjectFolder { }
123+
115124impl ToOwned for ProjectFolder {
116125 type Owned = Ref < Self > ;
117126
You can’t perform that action at this time.
0 commit comments