partial fix #36
GitHub Actions / clippy
failed
Mar 27, 2024 in 0s
clippy
2 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 2 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.77.0 (aedd173a2 2024-03-17)
- cargo 1.77.0 (3fe68eabf 2024-02-29)
- clippy 0.1.77 (aedd173 2024-03-17)
Annotations
Check failure on line 177 in src/events_source.rs
github-actions / clippy
cannot move out of `startup_event`, a captured variable in an `FnMut` closure
error[E0507]: cannot move out of `startup_event`, a captured variable in an `FnMut` closure
--> src/events_source.rs:169:62
|
168 | let startup_event = self.get_startup_event().clone();
| ------------- captured outer variable
169 | stream::unfold(recv_channel, move |mut recv_channel| async move {
| ______________________________________-----------------------_^
| | |
| | captured by this `FnMut` closure
170 | | let event_res = if starup_event_initialized {
171 | | recv_channel.recv().await.ok()
172 | | } else {
173 | | starup_event_initialized = true;
174 | | Some(Arc::new(startup_event.clone()))
| | -------------
| | |
| | variable moved due to use in coroutine
| | move occurs because `startup_event` has type `events_source::BuilderEvent<Types>`, which does not implement the `Copy` trait
175 | | };
176 | | event_res.map(|event| (event, recv_channel))
177 | | })
| |_________^ `startup_event` is moved here
Check failure on line 173 in src/events_source.rs
github-actions / clippy
value assigned to `starup_event_initialized` is never read
error: value assigned to `starup_event_initialized` is never read
--> src/events_source.rs:173:17
|
173 | starup_event_initialized = true;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: maybe it is overwritten before being read?
= note: `-D unused-assignments` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_assignments)]`
Loading