diff options
Diffstat (limited to 'crates/flycheck/src/lib.rs')
-rw-r--r-- | crates/flycheck/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/flycheck/src/lib.rs b/crates/flycheck/src/lib.rs index 7c38f5ef9..36e0e085a 100644 --- a/crates/flycheck/src/lib.rs +++ b/crates/flycheck/src/lib.rs | |||
@@ -108,7 +108,7 @@ struct FlycheckActor { | |||
108 | 108 | ||
109 | enum Event { | 109 | enum Event { |
110 | Restart(Restart), | 110 | Restart(Restart), |
111 | CheckEvent(Option<cargo_metadata::Message>), | 111 | CheckEvent(Option<Box<cargo_metadata::Message>>), |
112 | } | 112 | } |
113 | 113 | ||
114 | impl FlycheckActor { | 114 | impl FlycheckActor { |
@@ -123,7 +123,7 @@ impl FlycheckActor { | |||
123 | let check_chan = self.cargo_handle.as_ref().map(|cargo| &cargo.receiver); | 123 | let check_chan = self.cargo_handle.as_ref().map(|cargo| &cargo.receiver); |
124 | select! { | 124 | select! { |
125 | recv(inbox) -> msg => msg.ok().map(Event::Restart), | 125 | recv(inbox) -> msg => msg.ok().map(Event::Restart), |
126 | recv(check_chan.unwrap_or(&never())) -> msg => Some(Event::CheckEvent(msg.ok())), | 126 | recv(check_chan.unwrap_or(&never())) -> msg => Some(Event::CheckEvent(msg.ok().map(Box::new))), |
127 | } | 127 | } |
128 | } | 128 | } |
129 | fn run(mut self, inbox: Receiver<Restart>) { | 129 | fn run(mut self, inbox: Receiver<Restart>) { |
@@ -149,7 +149,7 @@ impl FlycheckActor { | |||
149 | let res = cargo_handle.join(); | 149 | let res = cargo_handle.join(); |
150 | self.send(Message::Progress(Progress::DidFinish(res))); | 150 | self.send(Message::Progress(Progress::DidFinish(res))); |
151 | } | 151 | } |
152 | Event::CheckEvent(Some(message)) => match message { | 152 | Event::CheckEvent(Some(message)) => match *message { |
153 | cargo_metadata::Message::CompilerArtifact(msg) => { | 153 | cargo_metadata::Message::CompilerArtifact(msg) => { |
154 | self.send(Message::Progress(Progress::DidCheckCrate(msg.target.name))); | 154 | self.send(Message::Progress(Progress::DidCheckCrate(msg.target.name))); |
155 | } | 155 | } |