I am trying to upgrade a project, that has vendored crates, from using libp2p 0.46 to 0.53.1 but I am getting an error when I try to build it.
error[E0599]: no method named `as_pin_mut` found for struct `Pin<&mut either::Either<A, B>>` in the current scope
--> <project>/vendor/crates/libp2p-core-0.39.2/src/either.rs:147:20
|
147 | match self.as_pin_mut() {
| ^^^^^^^^^^ help: there is a method with a similar name: `as_mut`
For more information about this error, try `rustc --explain E0599`
Any ideas why this might happen?
It seems
libp2p-coreuseseitherv1.5 as a dependency but the latest version is using a method only available ineitheras of v1.8. So when you updated to the latest version oflibp2p, your existing version ofeither(v1.6.1 apparently) was "still good" so it wasn't updated along in tandem.The quick fix would just be to update the version of
eitherusingcargo update:I have filed an issue so hopefully this gets addressed.