File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -12,17 +12,7 @@ pub struct Job {
12
12
/// Each proc should send its description before starting.
13
13
/// It should send either once or close immediately.
14
14
pub struct Work {
15
- inner : Box < dyn for < ' a , ' b > FnBox < & ' a JobState < ' b > , CargoResult < ( ) > > + Send > ,
16
- }
17
-
18
- trait FnBox < A , R > {
19
- fn call_box ( self : Box < Self > , a : A ) -> R ;
20
- }
21
-
22
- impl < A , R , F : FnOnce ( A ) -> R > FnBox < A , R > for F {
23
- fn call_box ( self : Box < F > , a : A ) -> R {
24
- ( * self ) ( a)
25
- }
15
+ inner : Box < dyn FnOnce ( & JobState < ' _ > ) -> CargoResult < ( ) > + Send > ,
26
16
}
27
17
28
18
impl Work {
@@ -38,7 +28,7 @@ impl Work {
38
28
}
39
29
40
30
pub fn call ( self , tx : & JobState < ' _ > ) -> CargoResult < ( ) > {
41
- self . inner . call_box ( tx)
31
+ ( self . inner ) ( tx)
42
32
}
43
33
44
34
pub fn then ( self , next : Work ) -> Work {
You can’t perform that action at this time.
0 commit comments