We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bcb89d1 + 573a5e7 commit 4a04a1cCopy full SHA for 4a04a1c
src/cargo/core/compiler/job.rs
@@ -12,17 +12,7 @@ pub struct Job {
12
/// Each proc should send its description before starting.
13
/// It should send either once or close immediately.
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
- }
+ inner: Box<dyn FnOnce(&JobState<'_>) -> CargoResult<()> + Send>,
26
}
27
28
impl Work {
@@ -38,7 +28,7 @@ impl Work {
38
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 {
0 commit comments