This PR is the result of a long winding issue when calling the client.push function from
within tokio::spawn.
The specific error was:
error: implementation of `Iterator` is not general enough
--> src/tester.rs:54:5
|
54 | res
| ^^^ implementation of `Iterator` is not general enough
|
= note: `Iterator` would have to be implemented for the type `std::slice::Iter<'0, ImageLayer>`, for any lifetime `'0`...
= note: ...but `Iterator` is actually implemented for the type `std::slice::Iter<'1, ImageLayer>`, for some specific lifetime `'1`
and
error: implementation of `FnOnce` is not general enough
--> src/tester.rs:54:5
|
54 | res
| ^^^ implementation of `FnOnce` is not general enough
|
= note: closure with signature `fn(&'0 ImageLayer) -> [async block@Client::push::{closure#0}::{closure#0}::{closure#0}]` must implement `FnOnce<(&ImageLayer,)>`, for any lifetime `'0`...
= note: ...but it actually implements `FnOnce<(&ImageLayer,)>
This PR is the result of a long winding issue when calling the
client.push
function from withintokio::spawn
.The specific error was:
and
or
Only once I found this specific rust issue: https://github.com/rust-lang/rust/issues/89976 did it make sense that this was the issue.