如何找到兼容版本的模块?

时间:2017-12-10 11:51:20

标签: rust

让一个程序需要两个包:foobarbarfoo作为依赖。

如果输入:

foo = "*"
bar = "*"

在您的Cargo.toml中,您可能有不同版本的foo。编译器将Foo(版本1)视为与Foo(版本2)不同。如何找到合适的版本以使构建工作?

我的Cargo.toml

piston_window = "*"
piston2d-opengl_graphics = "*"
pistoncore-sdl2_window = "*"
conrod = { version = "*", features = ["piston"] }

我的计划有效;然后我想做一个更新(因为我需要在板条箱中的一些最新的东西)。我现在有这个错误:

error[E0308]: mismatched types
  --> src/view/run_conrod.rs:80:21
   |
80 |                     context,
   |                     ^^^^^^^ expected struct `conrod::backend::piston::draw::Context`, found struct `piston_window::Context`
   |
   = note: expected type `conrod::backend::piston::draw::Context`
              found type `piston_window::Context`
note: Perhaps two different versions of crate `graphics` are being used?

0 个答案:

没有答案
相关问题