英文:
Error while building rust with libp2p-0.53.1
问题
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?
英文:
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?
答案1
得分: 2
It seems libp2p-core
uses either
v1.5 as a dependency but the latest version is using a method only available in either
as of v1.8. So when you updated to the latest version of libp2p
, your existing version of either
(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 either
using cargo update
:
cargo update -p either
I have filed an issue so hopefully this gets addressed.
英文:
It seems libp2p-core
uses either
v1.5 as a dependency but the latest version is using a method only available in either
as of v1.8. So when you updated to the latest version of libp2p
, your existing version of either
(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 either
using cargo update
:
cargo update -p either
I have filed an issue so hopefully this gets addressed.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论